!function(e){function t(t){for(var n,a,o=t[0],i=t[1],c=0,u=[];c1&&void 0!==arguments[1]?arguments[1]:[];return{type:"valid",value:e,warnings:t}},h=function(e){return{error:e,errorType:"full",type:"error"}},b=function(e,t,n){var r=new i.a(m(e,t,n));return h(r)},y=function(e,t,n){return{expected:e,actual:String(t),options:n,errorType:"mismatch",type:"error"}},v=function(e,t){return Object(o.a)(Object(o.a)({},e),{},{path:[].concat(Object(a.a)(e.path),[t])})},O=function(e){return function(t,n){return void 0===t?_(t):e(t,n)}},g=function(e){return function(t,n){return null===t?_(t):e(t,n)}},j=function(e,t){return function(n,r){var a=function(e){var t=e.options.path.join(".")||"value";return{error:"".concat(t," should be ").concat(e.expected),actual:"".concat(t," as ").concat(e.actual)}},o=function(e,t,n){return h(new i.a("Invalid value for ".concat(e,": ").concat(t,". You specified ").concat(n,".")))},c=e(n,r),s=t(n,r);if("error"===c.type&&"error"===s.type){if("mismatch"===c.errorType&&"mismatch"===s.errorType){var u=a(c),l=u.error,p=u.actual,d=a(s),f=d.error,m=d.actual;return o(r.label,l===f?l:"".concat(l," or ").concat(f),p===m?p:"".concat(p," and ").concat(m))}if("mismatch"===c.errorType){var _=a(c),b=_.error,y=_.actual;return o(r.label,b,y)}if("mismatch"===s.errorType){var v=a(s),O=v.error,g=v.actual;return o(r.label,O,g)}return h(c.error)}return"valid"===c.type?c:s}},E=function(e,t){return function(n,r){return n instanceof e?_(n):y("a ".concat(t," instance"),n,r)}},w=function(e,t){return function(n,r){var a=Object(s.a)(e,(function(e){return e===n}));if(void 0===a){var o=t?"a recognized string.":"one of the following strings: ".concat(e.join(", "));return y(o,n,r)}return _(a)}},S=function(e){return function(t,n){return"string"==typeof t&&0===t.indexOf(e)?_(t):y("a string starting with ".concat(e),t,n)}},k=function(e,t){return function(n,r){return"string"==typeof n&&n.length>=e&&n.length<=t?_(n):y(e===t?"a string of ".concat(e," characters"):"a string with ".concat(e," to ").concat(t," characters"),n,r)}},A=function(){for(var e=arguments.length,t=new Array(e),n=0;ne?_(t):y("a number greater than ".concat(e),t,n)}},D=function(e){return function(t,n){return"number"==typeof t&&t===parseInt(t,10)&&(!e||t>=0)?_(t):y(e?"a positive amount in the currency's subunit":"an amount in the currency's subunit",t,n)}},q=function(e,t){return D(!1)(e,t)},B=function(e,t){return D(!0)(e,t)},F=function(e,t){return e&&"object"==typeof e?_(e):y("an object",e,t)},U=function(e){return function(t,n){return Array.isArray(t)?t.map((function(t,r){return e(t,v(n,String(r)))})).reduce((function(e,t){return"error"===e.type?e:"error"===t.type?t:_([].concat(Object(a.a)(e.value),[t.value]),[].concat(Object(a.a)(e.warnings),Object(a.a)(t.warnings)))}),_([])):y("array",t,n)}},G=function(e){return function(t){return function(n,r){if(Array.isArray(n)){var a=t(n,r);if("valid"===a.type)for(var o={},c=0;c"))})),c.substring(0,1e3)),inPromise:n,apiMethodName:a}),e},o=function(e,t,n){return function(r){try{return e.call(this,r)}catch(e){return a(e,t||this&&this._controller,!1,n)}}},i=function(e,t,n){return function(r,o){try{return e.call(this,r,o)}catch(e){return a(e,t||this&&this._controller,!1,n)}}},c=function(e,t,n){return function(r,o,i){try{return e.call(this,r,o,i)}catch(e){return a(e,t||this&&this._controller,!1,n)}}},s=function(e,t,n){return function(){try{for(var r=arguments.length,o=new Array(r),i=0;i-1})):e.indexOf(t)>-1}},function(e,t,n){"use strict";function r(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}n.d(t,"a",(function(){return r}))},function(e,t,n){"use strict";n.d(t,"b",(function(){return i})),n.d(t,"a",(function(){return c})),n.d(t,"c",(function(){return s})),n.d(t,"d",(function(){return u}));var r,a=n(7),o=n(4),i={alipay:"alipay",affirm:"affirm",afterpay_clearpay:"afterpay_clearpay",au_becs_debit:"au_becs_debit",acss_debit:"acss_debit",bacs_debit:"bacs_debit",bancontact:"bancontact",blik:"blik",boleto:"boleto",card:"card",customer_balance:"customer_balance",eps:"eps",fpx:"fpx",giropay:"giropay",grabpay:"grabpay",ideal:"ideal",klarna:"klarna",konbini:"konbini",nz_bank_account:"nz_bank_account",oxxo:"oxxo",p24:"p24",paypal:"paypal",sepa_debit:"sepa_debit",sofort:"sofort",three_d_secure:"three_d_secure",upi:"upi",us_bank_account:"us_bank_account",wechat_pay:"wechat_pay",paynow:"paynow",pix:"pix",promptpay:"promptpay",netbanking:"netbanking",id_bank_transfer:"id_bank_transfer",link:"link",apple_pay:"apple_pay",google_pay:"google_pay"},c=(r={},Object(a.a)(r,o.b.auBankAccount,i.au_becs_debit),Object(a.a)(r,o.b.card,i.card),Object(a.a)(r,o.b.cardNumber,i.card),Object(a.a)(r,o.b.cardExpiry,i.card),Object(a.a)(r,o.b.cardCvc,i.card),Object(a.a)(r,o.b.postalCode,i.card),Object(a.a)(r,o.b.iban,i.sepa_debit),Object(a.a)(r,o.b.idealBank,i.ideal),Object(a.a)(r,o.b.fpxBank,i.fpx),Object(a.a)(r,o.b.p24Bank,i.p24),Object(a.a)(r,o.b.netbankingBank,i.netbanking),Object(a.a)(r,o.b.epsBank,i.eps),r),s=function(e){return-1===o.m.indexOf(e)},u=function(e,t){return null!=t?t:s(e)?null:c[e]||null}},function(e,t,n){"use strict";n.d(t,"b",(function(){return o})),n.d(t,"a",(function(){return i})),n.d(t,"g",(function(){return c})),n.d(t,"h",(function(){return s})),n.d(t,"d",(function(){return u})),n.d(t,"e",(function(){return l})),n.d(t,"f",(function(){return p})),n.d(t,"c",(function(){return d}));var r=n(1),a=n(10),o=(n(4),"webauthn"),i="spc",c=function(e,t){switch(e.type){case"object":return{paymentIntent:e.object};case"error":var n=t?{payment_intent:t}:{};return{error:Object(r.a)(Object(r.a)({},n),e.error)};default:return Object(a.a)(e)}},s=function(e,t){switch(e.type){case"error":return{error:Object(r.a)(Object(r.a)({},t?{setup_intent:t}:{}),e.error)};case"object":return{setupIntent:e.object};default:return Object(a.a)(e)}},u=function(e){var t=e.trim().match(/^((seti|pi)_[^_]+)_secret_[^-]+$/);return t?"pi"===t[2]?{id:t[1],clientSecret:t[0],type:"PAYMENT_INTENT"}:{id:t[1],clientSecret:t[0],type:"SETUP_INTENT"}:null},l=function(e){return"payment_intent"===e.object?{id:e.id,clientSecret:e.client_secret,type:"PAYMENT_INTENT"}:{id:e.id,clientSecret:e.client_secret,type:"SETUP_INTENT"}},p=function(e){return"requires_source_action"===e||"requires_action"===e},d=function(e){return"requires_source_action"===e.status||"requires_action"===e.status?e.next_action:null}},function(e,t,n){"use strict";n.d(t,"a",(function(){return r}));var r=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"absurd";throw new Error(t)}},function(e,t,n){"use strict";n.d(t,"a",(function(){return i}));var r=n(47);var a=n(63),o=n(45);function i(e){return function(e){if(Array.isArray(e))return Object(r.a)(e)}(e)||Object(a.a)(e)||Object(o.a)(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}},function(e,t,n){"use strict";n.d(t,"i",(function(){return l})),n.d(t,"j",(function(){return p})),n.d(t,"f",(function(){return d})),n.d(t,"g",(function(){return f})),n.d(t,"h",(function(){return m})),n.d(t,"k",(function(){return _})),n.d(t,"e",(function(){return h})),n.d(t,"a",(function(){return b})),n.d(t,"b",(function(){return y})),n.d(t,"d",(function(){return v})),n.d(t,"c",(function(){return O}));var r=n(19),a=n(0),o=n(31),i=n(3),c=n(8),s=n(21),u=function(e){var t=e.split(/(?=[A-Z])/).join("-").toLowerCase();return"https://stripe.com/docs/stripe-js/reference#stripe-".concat(t)},l=function(e,t){return Object(a.E)(s.h,e,"stripe.".concat(t," intent secret")).value},p=function(e,t){return Object(a.E)(s.i,e,"stripe.".concat(t," intent secret")).value},d=function(e){if(!e||!e.payment_method||!e.payment_method.type||"string"!=typeof e.payment_method.type)return null;var t=e.payment_method.type;return c.b[t]||null},f=function(e,t){return Object(a.E)(s.c,t,e).value},m=function(e,t,n,r){if("valid"===Object(a.F)(o.c,n,t).type)throw new i.a("Do not pass an Element to stripe.".concat(t,"() directly.\n")+"For more information: ".concat(u(t)));var c=Object(a.E)(Object(s.d)(e,t),n,t).value,l=c.source,p=c.paymentMethodData,d=c.paymentMethodOptions,f=c.paymentMethod,m=c.otherParams;if(null!=l&&(null!=p||null!=f))throw new i.a("".concat(t,": Expected either source or payment_method, but not both."));if(p){if(p.element)return{mode:{tag:"paymentMethod-from-element",type:e,elementName:p.element._componentName,frameId:p.element._implementation._frame.id,data:p.data,options:d,intentSecret:r},otherParams:m};if(e)return{mode:{tag:"paymentMethod-from-data",type:e,data:p.data,options:d,intentSecret:r},otherParams:m}}else{if(f)return{mode:{tag:"paymentMethod",paymentMethod:f,options:d,intentSecret:r},otherParams:m};if(l)return{mode:{tag:"source",source:l,intentSecret:r},otherParams:m}}return{mode:{tag:"none",intentSecret:r},otherParams:m}},_=function(e,t){if("object"==typeof e&&null!==e&&void 0!==e.handleActions)throw new i.a("stripe.".concat(t," does not support a handleActions option. For more information, see ").concat(u(t)))},h=function(e,t){var n=e.split("#"),a=Object(r.a)(n,2),o=a[0],i=a[1],c=o.split("?"),s=Object(r.a)(c,2),u=s[0],l=s[1],p="?",d="payment_intent"===t.object?["payment_intent","payment_intent_client_secret","redirect_status"]:["setup_intent","setup_intent_client_secret","redirect_status"];(l||"").split("&").forEach((function(e,t){var n=e.split("="),a=Object(r.a)(n,1)[0];-1===d.indexOf(a)&&(p+="".concat("?"===p?"":"&").concat(e))}));var f="payment_intent"===t.object?"payment":"setup";p+="".concat("?"===p?"":"&").concat(f,"_intent=").concat(t.id),p+="&".concat(f,"_intent_client_secret=").concat(t.client_secret);var m=u+(p+="&redirect_status=succeeded");return i?"".concat(m,"#").concat(i):m},b={type:"validation_error",code:"incomplete_payment_details"},y={type:"instant_verification_error",code:"instant_verification"},v={type:"validation_error",code:"unexpected"},O={type:"instant_verification_incomplete_error",code:"instant_verification_incomplete"}},function(e,t,n){"use strict";function r(e,t){if(null==e)return{};var n,r,a=function(e,t){if(null==e)return{};var n,r,a={},o=Object.keys(e);for(r=0;r=0||(a[n]=e[n]);return a}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}n.d(t,"a",(function(){return r}))},function(e,t,n){"use strict";t.a={card:"card",cardNumber:"cardNumber",cardExpiry:"cardExpiry",cardCvc:"cardCvc",postalCode:"postalCode",iban:"iban",idealBank:"idealBank",p24Bank:"p24Bank",paymentRequestButton:"paymentRequestButton",auBankAccount:"auBankAccount",fpxBank:"fpxBank",netbankingBank:"netbankingBank",epsBank:"epsBank",affirmMessage:"affirmMessage",afterpayClearpayMessage:"afterpayClearpayMessage",linkAuthentication:"linkAuthentication",payment:"payment",shippingAddress:"shippingAddress",idealBankSecondary:"idealBankSecondary",p24BankSecondary:"p24BankSecondary",auBankAccountNumber:"auBankAccountNumber",auBsb:"auBsb",fpxBankSecondary:"fpxBankSecondary",netbankingBankSecondary:"netbankingBankSecondary",issuingCardNumberDisplay:"issuingCardNumberDisplay",issuingCardCopyButton:"issuingCardCopyButton",issuingCardCvcDisplay:"issuingCardCvcDisplay",issuingCardExpiryDisplay:"issuingCardExpiryDisplay",issuingCardPinDisplay:"issuingCardPinDisplay",epsBankSecondary:"epsBankSecondary",affirmMessageModal:"affirmMessageModal",afterpayClearpayMessageModal:"afterpayClearpayMessageModal",autocompleteSuggestions:"autocompleteSuggestions",achBankSearchResults:"achBankSearchResults",loaderUi:"loaderUi"}},function(e,t,n){"use strict";t.a=function(e){return"".concat("https://js.stripe.com/v3/").concat(e||"")}},function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}n.d(t,"a",(function(){return r}))},function(e,t,n){"use strict";function r(){return(r=Object.assign||function(e){for(var t=1;t element.");return document.body},f=function(e){return requestAnimationFrame((function(){requestAnimationFrame(e)}))},m=function(e,t){return!!e.documentElement&&e.documentElement.contains(t)},_="isConnected"in window.Node.prototype?function(e,t){return t.isConnected&&t.ownerDocument===e}:m,h=function(e,t){return!m(e,t)&&_(e,t)}},function(e,t,n){"use strict";n.d(t,"g",(function(){return m})),n.d(t,"h",(function(){return _})),n.d(t,"i",(function(){return h})),n.d(t,"f",(function(){return b})),n.d(t,"e",(function(){return y})),n.d(t,"c",(function(){return v})),n.d(t,"b",(function(){return O})),n.d(t,"a",(function(){return g})),n.d(t,"d",(function(){return j}));var r=n(1),a=n(11),o=n(53);function i(e){var t=function(e,t){if("object"!==Object(o.a)(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!==Object(o.a)(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"===Object(o.a)(t)?t:String(t)}var c=n(13),s=n(3),u=n(0),l=n(31),p=n(4),d=n(8),f=n(9),m=function(e,t){if("string"!=typeof e)return Object(u.i)("a client_secret string",e,t);var n=Object(f.d)(e);return null===n?Object(u.i)("a client secret of the form ${id}_secret_${secret}",e,t):Object(u.D)(n,[])},_=function(e,t){var n=m(e,t);return"error"===n.type?n:n.value.type===p.g.SETUP_INTENT?Object(u.f)(new s.a(Object(u.B)("a PaymentIntent client secret","a SetupIntent client secret",t))):Object(u.D)(n.value,[])},h=function(e,t){var n=m(e,t);return"error"===n.type?n:n.value.type===p.g.PAYMENT_INTENT?Object(u.f)(new s.a(Object(u.B)("a SetupIntent client secret","a PaymentIntent client secret",t))):Object(u.D)(n.value,[])},b=function(e,t){if(null===e)return Object(u.g)("object","null",t);if("object"!=typeof e)return Object(u.g)("object",typeof e,t);var n=e.client_secret,r=e.status,a=e.next_action,o=m(n,Object(u.e)(t,"client_secret"));if("error"===o.type)return o;if("string"!=typeof r)return Object(u.g)("string",typeof r,Object(u.e)(t,"status"));if(("requires_source_action"===r||"requires_action"===r)&&"object"!=typeof a)return Object(u.g)("object",typeof a,Object(u.e)(t,"next_action"));if("payment_intent"===e.object){var i=e;return Object(u.D)(i,[])}var c=e;return Object(u.D)(c,[])},y=function(e){return function(t,n){if("object"!=typeof t)return Object(u.g)("object",typeof t,n);if(null===t)return Object(u.g)("object","null",n);var r,o=t.type,p=Object(c.a)(t,["type"]);if(null===e){if("string"!=typeof o)return Object(u.g)("a string such as 'card', 'ideal', or 'sepa_debit'",typeof o,Object(u.e)(n,"type"));r=o}else{if(void 0!==o&&o!==e)return"string"!=typeof o?Object(u.g)("a string such as 'card', 'ideal', or 'sepa_debit'",typeof o,Object(u.e)(n,"type")):Object(u.g)('"'.concat(o,'"'),'"'.concat(e,'"'),Object(u.e)(n,"type"));r=e}var f=p[r],m=(p[r],Object(c.a)(p,[r].map(i)));if(-1!==["acss_debit","affirm","afterpay_clearpay","alipay","bancontact","customer_balance","eps","giropay","grabpay","klarna","konbini","oxxo","p24","paynow","paypal","us_bank_account","wechat_pay","paynow","promptpay"].indexOf(r)&&void 0===f&&(f={}),"object"!=typeof f)return Object(u.g)("an object or element",typeof t[r],Object(u.e)(n,r));if(null===f)return Object(u.g)("an object or element","null",Object(u.e)(n,r));var _=Object(l.a)(f);if(_){var h=_._componentName;if(d.a[h]!==r){var b=[].concat(Object(a.a)(n.path),[r]).join("."),y=n.label,v=new s.a("Invalid value for ".concat(y,": ").concat(b," was `").concat(h,"` Element, which cannot be used to create ").concat(r," PaymentMethods."));return Object(u.f)(v)}return Object(u.D)({type:r,element:_,data:m})}return Object(u.D)({type:r,element:null,data:p})}},v=Object(u.G)(Object(u.u)({handleActions:Object(u.G)(u.b,(function(){return!0}))}),(function(){return{handleActions:!0}})),O=function(e){return function(t,n){if("object"!=typeof t)return Object(u.g)("object",typeof t,n);if(null===t)return Object(u.g)("object","null",n);var r=t.billing_details,a=Object(c.a)(t,["billing_details"]);return Object(u.D)({paymentMethodData:{type:"".concat(e),billing_details:r},otherParams:a})}},g=function(e){return function(t,n){if("object"!=typeof t)return Object(u.g)("object",typeof t,n);if(null===t)return Object(u.g)("object","null",n);var a=t.clientSecret,o=t.params,i=Object(c.a)(t,["clientSecret","params"]),s=Object(u.F)(e,a,n.label,{path:["clientSecret"]});if("error"===s.type)return s;if("object"!=typeof o)return Object(u.g)("object",typeof o,Object(u.e)(n,"params"));if(null===o)return Object(u.g)("object","null",Object(u.e)(n,"params"));var l=o.payment_method_type,p=o.payment_method_data;return"string"!=typeof l?Object(u.g)("string",typeof l,Object(u.e)(Object(u.e)(n,"params"),"payment_method_type")):"object"!=typeof p&&void 0!==p?Object(u.g)("object",typeof p,Object(u.e)(Object(u.e)(n,"params"),"payment_method_data")):Object(u.D)({clientSecret:s.value,paymentMethodData:Object(r.a)({type:l},(null==p?void 0:p.billing_details)&&{billing_details:null==p?void 0:p.billing_details}),otherParams:i})}},j=function(e,t){return function(n,o){if(void 0===n)return Object(u.D)({paymentMethodData:null,paymentMethodOptions:null,source:null,paymentMethod:null,otherParams:{}});if("object"!=typeof n)return Object(u.g)("object",typeof n,o);if(null===n)return Object(u.g)("object","null",o);var i=n.source,d=n.source_data,f=n.payment_method_data,m=n.payment_method_options,_=n.payment_method,h=Object(c.a)(n,["source","source_data","payment_method_data","payment_method_options","payment_method"]);if(null!=d)throw new s.a("".concat(t,": Expected payment_method, or source, not source_data."));if(null!=f)throw new s.a("".concat(t,": Expected payment_method, or source, not payment_method_data."));if(null!=i&&null!=_)throw new s.a("".concat(t,": Expected either payment_method or source, but not both."));if(null===e&&null!=_&&"string"!=typeof _)throw new s.a("".concat(t,": Expected payment_method[type] to be set if payment_method is passed."));if(null!=i){if("string"!=typeof i)return Object(u.g)("string",typeof i,Object(u.e)(o,"source"));if("updatePaymentIntent"===t)throw new s.a("".concat(t,": Expected payment_method, not source to be passed."));return Object(u.D)({source:i,paymentMethodData:null,paymentMethodOptions:null,paymentMethod:null,otherParams:h})}if(null!=_&&"string"!=typeof _&&"object"!=typeof _)return Object(u.g)("string or object",typeof _,Object(u.e)(o,"payment_method"));var b,v=Object(u.F)((b=e,function(e,t){if(null==e)return Object(u.D)(null);if("object"!=typeof e)return Object(u.g)("object",typeof e,t);var n=e.card,a=Object(c.a)(e,["card"]);if(!n||"object"!=typeof n)return Object(u.D)(e);var o=n.cvc,i=Object(c.a)(n,["cvc"]);if(null==o)return Object(u.D)(e);var s=Object(l.a)(o),d=s?s._componentName:"";return p.b.cardCvc!==d?Object(u.g)("`".concat(p.b.cardCvc,"` Element"),d?"`".concat(d,"` Element"):typeof o,Object(u.e)(t,"".concat(b||"card",".cvc"))):Object(u.D)(Object(r.a)(Object(r.a)({},a),{},{card:Object(r.a)(Object(r.a)({},i),{},{cvc:s})}))}),m,t,{path:[].concat(Object(a.a)(o.path),["payment_method_options"])});if("error"===v.type)return v;if("string"==typeof _)return Object(u.D)({source:null,paymentMethodData:null,paymentMethodOptions:v.value,paymentMethod:_,otherParams:h});if("object"==typeof _&&null!==_){var O=Object(u.F)(y(e),_,t,{path:[].concat(Object(a.a)(o.path),["payment_method"])});if("error"===O.type)return O;var g=O.value;return Object(u.D)({source:null,paymentMethod:null,paymentMethodOptions:v.value,paymentMethodData:g,otherParams:h})}return Object(u.D)({source:null,paymentMethodData:null,paymentMethodOptions:null,paymentMethod:null,otherParams:h})}}},function(e,t,n){"use strict";t.a={ADDRESS_AUTOCOMPLETE:"ADDRESS_AUTOCOMPLETE",CARD_ELEMENT:"CARD_ELEMENT",CONTROLLER:"CONTROLLER",METRICS_CONTROLLER:"METRICS_CONTROLLER",PAYMENT_REQUEST_ELEMENT:"PAYMENT_REQUEST_ELEMENT",PAYMENT_REQUEST_BROWSER:"PAYMENT_REQUEST_BROWSER",PAYMENT_REQUEST_GOOGLE_PAY:"PAYMENT_REQUEST_GOOGLE_PAY",IBAN_ELEMENT:"IBAN_ELEMENT",IDEAL_BANK_ELEMENT:"IDEAL_BANK_ELEMENT",P24_BANK_ELEMENT:"P24_BANK_ELEMENT",AUTHORIZE_WITH_URL:"AUTHORIZE_WITH_URL",STRIPE_3DS2_CHALLENGE:"STRIPE_3DS2_CHALLENGE",STRIPE_3DS2_FINGERPRINT:"STRIPE_3DS2_FINGERPRINT",AU_BANK_ACCOUNT_ELEMENT:"AU_BANK_ACCOUNT_ELEMENT",FPX_BANK_ELEMENT:"FPX_BANK_ELEMENT",LIGHTBOX_APP:"LIGHTBOX_APP",ISSUING_CARD_NUMBER_DISPLAY_ELEMENT:"ISSUING_CARD_NUMBER_DISPLAY_ELEMENT",ISSUING_CARD_COPY_BUTTON_ELEMENT:"ISSUING_CARD_COPY_BUTTON_ELEMENT",ISSUING_CARD_CVC_DISPLAY_ELEMENT:"ISSUING_CARD_CVC_DISPLAY_ELEMENT",ISSUING_CARD_EXPIRY_DISPLAY_ELEMENT:"ISSUING_CARD_EXPIRY_DISPLAY_ELEMENT",ISSUING_CARD_PIN_DISPLAY_ELEMENT:"ISSUING_CARD_PIN_DISPLAY_ELEMENT",EPS_BANK_ELEMENT:"EPS_BANK_ELEMENT",HCAPTCHA_APP:"HCAPTCHA_APP",NETBANKING_BANK_ELEMENT:"NETBANKING_BANK_ELEMENT",AFFIRM_MESSAGE_ELEMENT:"AFFIRM_MESSAGE_ELEMENT",AFFIRM_MESSAGE_MODAL_ELEMENT:"AFFIRM_MESSAGE_MODAL_ELEMENT",AFTERPAY_MESSAGE_MODAL_ELEMENT:"AFTERPAY_MESSAGE_MODAL_ELEMENT",AUTOCOMPLETE_SUGGESTIONS_ELEMENT:"AUTOCOMPLETE_SUGGESTIONS_ELEMENT",ACH_BANK_SEARCH_RESULTS_ELEMENT:"ACH_BANK_SEARCH_RESULTS_ELEMENT",INSTANT_DEBITS_APP:"INSTANT_DEBITS_APP",LINK_AUTHENTICATION_ELEMENT:"LINK_AUTHENTICATION_ELEMENT",PAYMENT_ELEMENT:"PAYMENT_ELEMENT",LINKED_ACCOUNTS_INNER:"LINKED_ACCOUNTS_INNER",WECHAT_PAY_INNER:"WECHAT_PAY_INNER",PAYNOW_INNER:"PAYNOW_INNER",PROMPTPAY_INNER:"PROMPTPAY_INNER",SHIPPING_ADDRESS_ELEMENT:"SHIPPING_ADDRESS_ELEMENT",LINK_AUTOFILL_MODAL:"LINK_AUTOFILL_MODAL",GOOGLE_MAPS_APP:"GOOGLE_MAPS_APP",LOADER_UI_APP:"LOADER_UI_APP"}},function(e,t,n){"use strict";n.d(t,"e",(function(){return p})),n.d(t,"d",(function(){return d})),n.d(t,"g",(function(){return f})),n.d(t,"h",(function(){return m})),n.d(t,"a",(function(){return _})),n.d(t,"i",(function(){return h})),n.d(t,"f",(function(){return b})),n.d(t,"k",(function(){return y})),n.d(t,"c",(function(){return v})),n.d(t,"l",(function(){return O})),n.d(t,"b",(function(){return g})),n.d(t,"j",(function(){return j}));var r=function(e){return/Edge\//i.test(e)},a=function(e){return/Edg\//i.test(e)},o=function(e){return/(MSIE ([0-9]{1,}[.0-9]{0,})|Trident\/)/i.test(e)},i=function(e){return/SamsungBrowser/.test(e)},c=function(e){return/iPad|iPhone/i.test(e)&&!o(e)},s=function(e){return/^((?!chrome|android).)*safari/i.test(e)&&!i(e)},u=function(e){return/Android/i.test(e)&&!o(e)},l=window.navigator.userAgent,p=r(l),d=a(l),f=(/Edge\/((1[0-6]\.)|0\.)/i.test(l),o(l)),m=(function(e){/MSIE ([0-9]{1,}[.0-9]{0,})/i.test(e)}(l),c(l)),_=(function(e){/iPad/i.test(e)&&o(e)}(l),function(e){c(e)||u(e)}(l),u(l)),h=(function(e){/Android 4\./i.test(e)&&!/Chrome/i.test(e)&&u(e)}(l),s(l)),b=(function(e){s(e)&&c(e)}(l),function(e){return/Firefox\//i.test(e)}(l)),y=(function(e){/Firefox\/(50|51|[0-4]?\d)([^\d]|$)/i.test(e)}(l),i(l)),v=function(e){return/Chrome\//i.test(e)}(l),O=(function(e){/Chrome\/(6[6-9]|[7-9]\d+|[1-9]\d{2,})/i.test(e)}(l),function(e){return/AppleWebKit/i.test(e)&&!/Chrome/i.test(e)&&!r(e)&&!o(e)}(l)),g=function(e){return/Chrome/i.test(e)&&!r(e)}(l),j=(function(e){/CriOS/i.test(e)}(l),h&&"download"in document.createElement("a"));!!window.navigator.brave&&window.navigator.brave.isBrave},function(e,t,n){"use strict";function r(e,t){for(var n=0;n0){var n=500*Math.pow(2,3-l);c=setTimeout(d,n),l-=1}else o(e,p)}}))}(),function(){clearTimeout(c),u=!1}}},function(e,t,n){"use strict";n.d(t,"b",(function(){return s})),n.d(t,"d",(function(){return u})),n.d(t,"a",(function(){return p})),n.d(t,"c",(function(){return d}));var r,a,o,i=n(7),c=n(4),s=(r={},Object(i.a)(r,c.b.card,{unique:!0,conflict:[c.b.cardNumber,c.b.cardExpiry,c.b.cardCvc,c.b.postalCode],beta:!1,implementation:"legacy"}),Object(i.a)(r,c.b.cardNumber,{unique:!0,conflict:[c.b.card],beta:!1,implementation:"legacy"}),Object(i.a)(r,c.b.cardExpiry,{unique:!0,conflict:[c.b.card],beta:!1,implementation:"legacy"}),Object(i.a)(r,c.b.cardCvc,{unique:!0,conflict:[c.b.card],beta:!1,implementation:"legacy"}),Object(i.a)(r,c.b.postalCode,{unique:!0,conflict:[c.b.card],beta:!1,implementation:"legacy"}),Object(i.a)(r,c.b.paymentRequestButton,{unique:!0,conflict:[],beta:!1,implementation:"legacy"}),Object(i.a)(r,c.b.iban,{unique:!0,conflict:[],beta:!1,implementation:"legacy"}),Object(i.a)(r,c.b.idealBank,{unique:!0,conflict:[],beta:!1,implementation:"legacy"}),Object(i.a)(r,c.b.p24Bank,{unique:!0,conflict:[],beta:!1,implementation:"legacy"}),Object(i.a)(r,c.b.auBankAccount,{unique:!0,beta:!1,conflict:[],implementation:"legacy"}),Object(i.a)(r,c.b.fpxBank,{unique:!0,beta:!1,conflict:[],implementation:"legacy"}),Object(i.a)(r,c.b.netbankingBank,{unique:!0,beta:!0,conflict:[],implementation:"legacy"}),Object(i.a)(r,c.b.issuingCardCopyButton,{unique:!1,beta:!0,conflict:[],implementation:"legacy"}),Object(i.a)(r,c.b.issuingCardNumberDisplay,{unique:!1,beta:!0,conflict:[],implementation:"legacy"}),Object(i.a)(r,c.b.issuingCardCvcDisplay,{unique:!1,beta:!0,conflict:[],implementation:"legacy"}),Object(i.a)(r,c.b.issuingCardExpiryDisplay,{unique:!1,beta:!0,conflict:[],implementation:"legacy"}),Object(i.a)(r,c.b.issuingCardPinDisplay,{unique:!1,beta:!0,conflict:[],implementation:"legacy"}),Object(i.a)(r,c.b.epsBank,{unique:!0,conflict:[],beta:!0,implementation:"legacy"}),Object(i.a)(r,c.b.affirmMessage,{unique:!1,conflict:[],beta:!0,implementation:"affirm_message"}),Object(i.a)(r,c.b.afterpayClearpayMessage,{unique:!1,conflict:[],beta:!1,implementation:"afterpay_message"}),Object(i.a)(r,c.b.linkAuthentication,{unique:!0,conflict:[],beta:!0,implementation:"frame"}),Object(i.a)(r,c.b.payment,{unique:!0,conflict:[],beta:!0,implementation:"frame"}),Object(i.a)(r,c.b.shippingAddress,{unique:!0,conflict:[],beta:!0,implementation:"frame"}),r),u="__PrivateStripeElement",l=["brand"],p=(a={},Object(i.a)(a,c.b.card,l),Object(i.a)(a,c.b.cardNumber,l),Object(i.a)(a,c.b.iban,["country","bankName"]),Object(i.a)(a,c.b.auBankAccount,["bankName","branchName"]),a),d=(o={},Object(i.a)(o,c.b.idealBank,{secondary:c.b.idealBankSecondary}),Object(i.a)(o,c.b.p24Bank,{secondary:c.b.p24BankSecondary}),Object(i.a)(o,c.b.fpxBank,{secondary:c.b.fpxBankSecondary}),Object(i.a)(o,c.b.netbankingBank,{secondary:c.b.netbankingBankSecondary}),Object(i.a)(o,c.b.epsBank,{secondary:c.b.epsBankSecondary}),o)},function(e,t,n){"use strict";n.d(t,"c",(function(){return o})),n.d(t,"a",(function(){return i})),n.d(t,"b",(function(){return p}));var r=n(0),a={_componentName:r.x,_implementation:Object(r.u)({_frame:Object(r.u)({id:r.x})})},o=Object(r.u)(a),i=function(e){var t=Object(r.F)(o,e,"");return"error"===t.type?null:t.value},c={clientSecret:Object(r.u)({id:r.x,clientSecret:r.x,type:r.x})},s=Object(r.u)(c),u={_elements:Object(r.a)(o),_id:r.x,_commonOptions:s},l=Object(r.u)(u),p=function(e){var t=Object(r.F)(l,e,"");return"error"===t.type?null:t.value}},function(e,t,n){"use strict";function r(e){return(r=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}n.d(t,"a",(function(){return r}))},function(e,t,n){"use strict";n.d(t,"a",(function(){return a})),n.d(t,"b",(function(){return o}));var r=n(2),a=function(e){return new r.a((function(t,n){var r=setTimeout((function(){t({type:"error",error:{code:"redirect_error",message:"Failed to redirect to ".concat(e)},locale:"en"})}),6e4);window.addEventListener("pagehide",(function(){clearTimeout(r)})),window.top.location.href=e}))},o=function(e,t,n){e.report("redirect_error",{initiator:t,error:n.error})}},function(e,t,n){"use strict";function r(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}n.d(t,"a",(function(){return r}))},function(e,t,n){"use strict";n.d(t,"b",(function(){return a})),n.d(t,"a",(function(){return o})),n.d(t,"d",(function(){return i})),n.d(t,"c",(function(){return c}));var r=/^(http(s)?):\/\//,a=function(e){return r.test(e)},o=function(e){var t=e.match(r);return t&&t.length?t[1]:null},i=function(e){if(!a(e))return null;var t=document.createElement("a");t.href=e;var n=t.protocol,r=t.host,o=t.pathname,i=/:80$/,c=/:443$/;return"http:"===n&&i.test(r)?r=r.replace(i,""):"https:"===n&&c.test(r)&&(r=r.replace(c,"")),{host:r,protocol:n,origin:"".concat(n,"//").concat(r),path:o}},c=function(e,t){if("/"===t[0]){var n=i(e);return n?"".concat(n.origin).concat(t):t}var r=e.replace(/\/[^/]*$/,"/");return"".concat(r).concat(t)}},function(e,t,n){"use strict";n.d(t,"a",(function(){return o})),n.d(t,"b",(function(){return i}));var r="00".concat(Math.floor(1e3*Math.random())).slice(-3),a=0,o=function(e){return"".concat(e).concat(r).concat(a++)},i=function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return t?(parseInt(t,10)^16*Math.random()>>parseInt(t,10)/4).toString(16):"00000000-0000-4000-8000-000000000000".replace(/[08]/g,e)}},function(e,t,n){"use strict";n.d(t,"a",(function(){return b})),n.d(t,"c",(function(){return y})),n.d(t,"d",(function(){return v})),n.d(t,"e",(function(){return O})),n.d(t,"f",(function(){return g})),n.d(t,"g",(function(){return j})),n.d(t,"b",(function(){return E}));var r=n(1),a=n(4),o=n(2),i=n(59),c=n(49),s=n(33),u=n(10),l=n(0),p="close",d="complete",f=(Object(l.w)("bcsess_"),{test:"pk_test_51IRoVcAI0bnnJOjmMRHo1VmwhAhWw6hYu50LlvNiObGGwSGMWHHgJew4g7fD8JS6m0LZZeU4M4ADNU1fjNG4BrDF00NrfWM8Xp",live:"pk_live_51IRoVcAI0bnnJOjmkQjg7OxC4Yx4OTniNC6VZT2ufgCDenJDYdLVIoFjaZ5PpESYtt7pT1q12mYsKN9w9BN0RoM100GeMvV1N2"}),m=n(28),_=function(e,t){return new o.a((function(n){var r;try{r=t.createLightboxFrame({type:a.c.LINKED_ACCOUNTS_INNER,options:e})}catch(e){return n({error:{message:e.message}})}return r.show(),r.fadeInBackdrop(),r._on(p,(function(){r.fadeOutBackdrop()})),r._on(d,(function(e){r.destroy(!0).then((function(){n(function(e){switch(e.type){case"object":var t=e.object,n=t.id,r=t.linked_accounts,a=t.payment_account,o={id:n,linkedAccounts:r};return a&&(o.paymentAccount=a),{linkAccountSession:o,linkedAccounts:r};case"error":return{error:{message:e.error.message||"stripe.linkAccounts: an unknown error occurred.",type:e.error.type}};default:return Object(u.a)(e)}}(e))}))})),null}))},h=function(e){var t=e.linkAccountSessionCreatorClientSecret,n=e.linkAccountSessionCreatorType,r=e.linkAccountSessionCreatorId,a=e.controller,o=e.consumerSessionSecret,u=e.redirect,l=e.linkAccountSessionCreationParams;Object(i.b)(a.warn);var p=a._stripeAccount,d=a._apiVersion,h=a._apiKey,b=Object(m.c)(h);return"link_payment_intent"===n&&"unknown"!==b&&(h=f[b],d=null),u?function(e,t){var n="".concat("https://auth.stripe.com/","link-accounts#").concat(Object(c.a)(e));return Object(s.a)(n).then((function(e){Object(s.b)(t,"linkAccounts redirect",e);var n=e.error;return{error:{message:n.message,code:n.code,type:n.type}}}))}({clientSecret:t,apiKey:h,stripeAccount:p,stripeVersion:d},a):_({clientSecret:t,linkAccountSessionCreatorType:n,linkAccountSessionCreatorId:r,linkAccountSessionCreationParams:l,apiKey:h,consumerSessionSecret:o,stripeAccount:p,stripeVersion:d},a)},b=function(e,t,n){return h(Object(r.a)({linkAccountSessionCreatorClientSecret:e,linkAccountSessionCreatorType:"link_account_session",controller:t},n))},y=function(e,t,n,r){return h({linkAccountSessionCreatorClientSecret:e,linkAccountSessionCreatorType:"link_payment_intent",linkAccountSessionCreatorId:t,controller:n,consumerSessionSecret:r})},v=function(e,t,n){return h({linkAccountSessionCreatorClientSecret:e,linkAccountSessionCreatorType:"payment_intent",linkAccountSessionCreatorId:t,controller:n})},O=function(e,t,n,r){return h({linkAccountSessionCreatorClientSecret:e,linkAccountSessionCreatorType:"payment_intent",linkAccountSessionCreatorId:t,controller:n,linkAccountSessionCreationParams:{payment_method_data:r}})},g=function(e,t,n){return h({linkAccountSessionCreatorClientSecret:e,linkAccountSessionCreatorType:"setup_intent",linkAccountSessionCreatorId:t,controller:n})},j=function(e,t,n,r){return h({linkAccountSessionCreatorClientSecret:e,linkAccountSessionCreatorType:"setup_intent",linkAccountSessionCreatorId:t,controller:n,linkAccountSessionCreationParams:{payment_method_data:r}})},E=function(e){var t=e.linkAccountSessionCreatorClientSecret,n=e.linkAccountSessionCreatorType,r=e.createdBy,a=e.controller,o=e.attachRequired,i=e.institution,c=e.data,s=e.manualEntryOnly,u=e.searchSession;return h({linkAccountSessionCreatorClientSecret:t,linkAccountSessionCreatorType:n,linkAccountSessionCreatorId:r,controller:a,linkAccountSessionCreationParams:{attach_required:o,initial_institution:i,payment_method_data:c,manual_entry_only:s,search_session:u}})}},function(e,t,n){"use strict";n.d(t,"a",(function(){return v})),n.d(t,"c",(function(){return g})),n.d(t,"b",(function(){return j}));var r=n(9),a=n(66),o=n(67),i=n(71),c=n(2),s=n(25),u=n(43),l=n(68),p=n(29),d=n(72),f=n(12),m=function(e){var t=e.controller,n=e.intentSecret,r=e.intentType,a=e.locale;return new c.a((function(e,o){setTimeout((function o(){Object(p.d)(n,r,t,a).then((function(n){var r,a=Object(p.b)(n);null!==a?"requires_action"!==a.status||"blik_authorize"!==a.next_action.type?e(n):setTimeout(o,5e3):e((r=f.d,t.action.localizeError(r).then((function(e){return{error:e}}))))}))}),8e3)}))},_=n(4),h=n(69),b=n(10),y=n(3),v=function(e){switch(e.type){case"error":var t=e.error;if("payment_intent_unexpected_state"===t.code&&"object"==typeof t.payment_intent&&null!=t.payment_intent&&"string"==typeof t.payment_intent.status&&Object(r.f)(t.payment_intent.status)){var n=t.payment_intent;return{type:"object",locale:e.locale,object:n}}return e;case"object":return e;default:return Object(b.a)(e)}},O=function(e,t,f,b,v,O){var g=Object(a.a)(Object(r.c)(t),f,e),j=Object(r.e)(t);if(!g)return c.a.resolve({paymentIntent:t});switch(g.type){case"cardimageverification-challenge":return n.e(6).then(n.bind(null,99)).then((function(n){return(0,n.performCardImageVerification)(g,t,e,b)}));case"captcha-challenge":return Object(l.a)(g,t,e,b);case"3ds1-modal":return Object(o.a)(g,j,_.g.PAYMENT_INTENT,e,b,O);case"3ds2-fingerprint":case"3ds2-challenge":return Object(i.a)(g,{intentSecret:j,intentType:_.g.PAYMENT_INTENT,controller:e,locale:b,hosted:v},O);case"redirect":return Object(h.a)(t,g.redirectUrl,e);case"blik_authorize":return m({controller:e,intentSecret:j,intentType:_.g.PAYMENT_INTENT,locale:b});case"boleto-display":if(void 0===g.hostedVoucherUrl)throw new y.a("Expect `next_action.boleto_display_details.hosted_voucher_url` of `PaymentIntent` to be not undefined. Please refer to \n\nhttps://stripe.com/docs/api/payment_intents/object#payment_intent_object-next_action-boleto_display_details-hosted_voucher_url");return function(e){var t=e.controller,n=e.url,r=e.intent,a=e.locale,o=Object(s.b)(t,{url:Object(u.a)(n),size:"600x700",locale:a,frameTitle:"boleto.voucher_frame_title",useLightboxHostedCloseButton:!1});return new c.a((function(e){o._on("request-close",(function(){Object(s.a)(o).then((function(){e({paymentIntent:r})}))}))}))}({controller:e,locale:b,url:g.hostedVoucherUrl,intent:t});case"konbini-display":if(void 0===g.hostedVoucherUrl)throw new y.a("Expected option `handleActions` to be `false`. The Konbini pilot does not handle the next actions for you automatically yet (e.g. displaying Konbini payment details). Please refer to the Stripe Konbini integration guide for more info: \n\nhttps://stripe.com/docs/payments/konbini");return function(e){var t=e.controller,n=e.url,r=e.intent,a=e.locale,o=Object(s.b)(t,{url:Object(u.a)(n),size:"600x900",locale:a,frameTitle:"konbini.voucher_frame_title",useLightboxHostedCloseButton:!1});return new c.a((function(e){o._on("request-close",(function(){Object(s.a)(o).then((function(){e({paymentIntent:r})}))}))}))}({controller:e,locale:b,url:g.hostedVoucherUrl,intent:t});case"oxxo-display":if(void 0===g.hostedVoucherUrl)throw new y.a("To handle the next actions automatically, set the API version to oxxo_beta=v2. Please refer to the Stripe OXXO integration guide for more info: \n\nhttps://stripe.com/docs/payments/oxxo");return function(e){var t=e.controller,n=e.url,r=e.intent,a=e.locale,o=Object(s.b)(t,{url:Object(u.a)(n),size:"600x700",locale:a,frameTitle:"oxxo.voucher_frame_title",useLightboxHostedCloseButton:!1});return new c.a((function(e){o._on("request-close",(function(){Object(s.a)(o).then((function(){e({paymentIntent:r})}))}))}))}({controller:e,locale:b,url:g.hostedVoucherUrl,intent:t});case"upi_await_notification":return function(e){var t=e.controller,n=e.intentSecret,r=e.intentType,a=e.locale;return new c.a((function(e){setTimeout((function o(){Object(p.d)(n,r,t,a).then((function(t){var n=Object(p.b)(t);if(null!==n)switch(n.status){case"requires_action":return void setTimeout(o,1e4);default:e(t)}}))}),5e3)}))}({controller:e,intentSecret:j,intentType:_.g.PAYMENT_INTENT,locale:b});case"us_bank_account_link":return Object(d.a)({controller:e,intentSecret:j,intentType:_.g.PAYMENT_INTENT,locale:b});case"link_authenticate_account":return e.action.completeLinkPayment({intentSecret:t.client_secret,intentId:t.id,expandParam:O}).then((function(e){return e?c.a.resolve(Object(r.g)(e)):c.a.resolve({paymentIntent:t})}));case"wechat_pay_display_qr_code":return function(e){var t=e.controller,n=e.intent,a=e.intentType,o=e.intentSecret,i=e.locale,u=Object(r.c)(n);if(!u||"wechat_pay_display_qr_code"!==u.type)throw new Error("Expected next_action.wechat_pay_display_qr_code");var l=t.createLightboxFrame({type:_.c.WECHAT_PAY_INNER,options:{qrCodeData:u.wechat_pay_display_qr_code.data,qrCodeUrl:u.wechat_pay_display_qr_code.image_url_png,locale:i}}),d=null;return new c.a((function(e,r){l._on("load",(function(){l.show(),l.fadeInBackdrop()})),l._once("request-close",(function(){Object(s.a)(l).then((function(){d&&clearTimeout(d),e({paymentIntent:n})}))})),l._on("complete",(function(t){Object(s.a)(l).then((function(){d&&clearTimeout(d),e(t)}))})),d=setTimeout((function n(){Object(p.d)(o,a,t,i).then((function(t){var r=Object(p.b)(t);if(null!==r)switch(r.status){case"requires_action":return void(d=setTimeout(n,2e3));default:l.destroy(!0).then((function(){"payment_intent"===r.object?e({paymentIntent:r}):e({setupIntent:r})}))}}))}),5e3)}))}({controller:e,locale:b,intent:t,intentSecret:j,intentType:_.g.PAYMENT_INTENT});case"paynow_display_qr_code":return function(e){var t=e.controller,n=e.intent,a=e.intentType,o=e.intentSecret,i=e.locale,u=Object(r.c)(n);if(!u||"paynow_display_qr_code"!==u.type)throw new Error("Expected next_action.paynow_display_qr_code");var l=t.createLightboxFrame({type:_.c.PAYNOW_INNER,options:{qrCodeUrl:u.paynow_display_qr_code.image_url_png,qrCodeData:u.paynow_display_qr_code.data,locale:i}}),d=null;return new c.a((function(e,r){l._on("load",(function(){l.show(),l.fadeInBackdrop()})),l._once("request-close",(function(){Object(s.a)(l).then((function(){d&&clearTimeout(d),e({paymentIntent:n})}))})),l._on("complete",(function(t){Object(s.a)(l).then((function(){d&&clearTimeout(d),e(t)}))})),d=setTimeout((function n(){Object(p.d)(o,a,t,i).then((function(t){var r=Object(p.b)(t);if(null!==r)switch(r.status){case"requires_action":return void(d=setTimeout(n,2e3));default:l.destroy(!0).then((function(){"payment_intent"===r.object?e({paymentIntent:r}):e({setupIntent:r})}))}}))}),5e3)}))}({controller:e,locale:b,intent:t,intentSecret:j,intentType:_.g.PAYMENT_INTENT});case"pix_display_qr_code":throw new y.a("Expected option `handleActions` to be `false`. The Pix pilot does not handle the next action for you automatically yet (e.g. displaying Pix QR Code). Please refer to the Stripe Pix integration guide for more info: \n\nhttps://stripe.com/docs/payments/pix");case"promptpay_display_qr_code":return function(e){var t=e.controller,n=e.intent,a=e.intentType,o=e.intentSecret,i=e.locale,u=Object(r.c)(n);if(!u||"promptpay_display_qr_code"!==u.type)throw new Error("Expected next_action.promptpay_display_qr_code");var l=t.createLightboxFrame({type:_.c.PROMPTPAY_INNER,options:{qrCodeImageDataUrl:u.promptpay_display_qr_code.image_url,qrCodeUrl:u.promptpay_display_qr_code.data,locale:i}}),d=null;return new c.a((function(e,r){l._on("load",(function(){l.show(),l.fadeInBackdrop()})),l._once("request-close",(function(){Object(s.a)(l).then((function(){d&&clearTimeout(d),e({paymentIntent:n})}))})),l._on("complete",(function(t){Object(s.a)(l).then((function(){d&&clearTimeout(d),e(t)}))})),d=setTimeout((function n(){Object(p.d)(o,a,t,i).then((function(t){var r=Object(p.b)(t);if(null!==r)switch(r.status){case"requires_action":return void(d=setTimeout(n,2e3));default:l.destroy(!0).then((function(){"payment_intent"===r.object?e({paymentIntent:r}):e({setupIntent:r})}))}}))}),5e3)}))}({controller:e,locale:b,intent:t,intentSecret:j,intentType:_.g.PAYMENT_INTENT});default:return c.a.resolve({paymentIntent:t})}},g=function e(t,n,r,a,o,i){var c=arguments.length>6&&void 0!==arguments[6]?arguments[6]:0;if(_.i=0},o=Object.keys(r)},function(e,t,n){"use strict";n.d(t,"a",(function(){return a})),n.d(t,"b",(function(){return o})),n.d(t,"c",(function(){return i}));var r=n(35),a=function(e,t){var n=Object(r.d)(e),a=Object(r.d)(t);return!(!n||!a)&&n.origin===a.origin},o=function(e){return a(e,"https://js.stripe.com/v3/")},i=function(e){return o(e)||function(e){var t=Object(r.d)(e),n=t?t.host:"";return"stripe.com"===n||!!n.match(/\.stripe\.(com|me)$/)}(e)}},function(e,t,n){"use strict";n.d(t,"a",(function(){return r}));n(4);function r(e){return e}},function(e,t,n){"use strict";n.d(t,"a",(function(){return a}));var r=n(32);function a(e,t,n){return(a="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(e,t,n){var a=function(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=Object(r.a)(e)););return e}(e,t);if(a){var o=Object.getOwnPropertyDescriptor(a,t);return o.get?o.get.call(n):o.value}})(e,t,n||e)}},function(e,t,n){"use strict";n.d(t,"a",(function(){return a}));var r=n(47);function a(e,t){if(e){if("string"==typeof e)return Object(r.a)(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Object(r.a)(e,t):void 0}}},function(e,t,n){"use strict";var r=n(1),a=n(11),o=n(16),i=n(24),c=n(26),s=n(27),u=n(4),l=n(49),p=n(36),d=n(2),f=n(61),m=n(57),_=function(e){Object(c.a)(n,e);var t=Object(s.a)(n);function n(e){var r,a=e.type,i=e.controllerId,c=e.listenerRegistry,s=e.betas,u=e.appParams;return Object(o.a)(this,n),(r=t.call(this))._sendFAReq=function(e){var t=Object(p.a)(e.tag);return new d.a((function(n,a){r._requests[t]={resolve:n,reject:a},r._send({message:{action:"stripe-frame-action",payload:{nonce:t,faReq:e}},type:"outer",frameId:r.id,controllerId:r._controllerId})}))},r.action={perform3DS2Challenge:function(e){return r._sendFAReq({tag:"PERFORM_3DS2_CHALLENGE",value:e})},perform3DS2Fingerprint:function(e){return r._sendFAReq({tag:"PERFORM_3DS2_FINGERPRINT",value:e})},performOneClickWebauthnAuthentication:function(e){return r._sendFAReq({tag:"PERFORM_ONE_CLICK_WEBAUTHN_AUTHENTICATION",value:e})},show3DS2Spinner:function(e){return r._sendFAReq({tag:"SHOW_3DS2_SPINNER",value:e})},checkCanMakePayment:function(e){return r._sendFAReq({tag:"CHECK_CAN_MAKE_PAYMENT",value:e})},closeLightboxFrame:function(e){return r._sendFAReq({tag:"CLOSE_LIGHTBOX_FRAME",value:e})},openLightboxFrame:function(e){return r._sendFAReq({tag:"OPEN_LIGHTBOX_FRAME",value:e})},setFocusTarget:function(e){return r._sendFAReq({tag:"SET_FOCUS_TARGET",value:e})}},r.type=a,r.loaded=!1,r._controllerId=i,r._persistentMessages=[],r._queuedMessages=[],r._requests={},r._listenerRegistry=c,r.id=r._generateId(),r._iframe=r._createIFrame(a,s,u),r._on("load",(function(){r.loaded=!0,r._ensureMounted(),r.loaded&&(r._persistentMessages.forEach((function(e){return r._send(e)})),r._queuedMessages.forEach((function(e){return r._send(e)})),r._queuedMessages=[])})),r._on("title",(function(e){var t=e.title;r._iframe.setAttribute("title",t)})),r}return Object(i.a)(n,[{key:"_generateId",value:function(){return Object(p.a)("__privateStripeFrame")}},{key:"send",value:function(e){this._send({message:e,type:"outer",frameId:this.id,controllerId:this._controllerId})}},{key:"sendPersistent",value:function(e){this._ensureMounted();var t={message:e,type:"outer",frameId:this.id,controllerId:this._controllerId};this._persistentMessages=[].concat(Object(a.a)(this._persistentMessages),[t]),this.loaded&&Object(f.b)(t)}},{key:"resolve",value:function(e,t){this._requests[e]&&this._requests[e].resolve(t)}},{key:"reject",value:function(e,t){this._requests[e]&&this._requests[e].reject(t)}},{key:"_send",value:function(e){this._ensureMounted(),this.loaded?Object(f.b)(e):this._queuedMessages=[].concat(Object(a.a)(this._queuedMessages),[e])}},{key:"appendTo",value:function(e){this._emit("mount",{anchor:e}),e.appendChild(this._iframe)}},{key:"unmount",value:function(){this.loaded=!1,this._emit("unload")}},{key:"destroy",value:function(){this.unmount();var e=this._iframe.parentElement;e&&e.removeChild(this._iframe),this._emit("destroy")}},{key:"_ensureMounted",value:function(){this._isMounted()||this.unmount()}},{key:"_isMounted",value:function(){return!!document.body&&document.body.contains(this._iframe)}},{key:"_createIFrame",value:function(e,t,n){var a=window.location.href.toString(),o="string"==typeof n?n:Object(l.a)(Object(r.a)(Object(r.a)({},n||{}),{},{referrer:a,controllerId:this._controllerId})),i=document.createElement("iframe");i.setAttribute("name",this.id);var c=Object(u.d)(e);return Object.keys(c).forEach((function(e){i.setAttribute(e,c[e])})),(null==n?void 0:n.allowCamera)&&i.setAttribute("allow","camera"),i.src="".concat(Object(u.e)(e)).concat(o?"#":"").concat(o),i}}]),n}(m.a);t.a=_},function(e,t,n){"use strict";function r(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n0&&void 0!==arguments[0]&&arguments[0],t=l.fadeOutBackdrop().then((function(){l._backdrop.unmount(),e||Object(c.a)((o=Object(a.a)(l),Object(s.a)(n.prototype)),"destroy",o).call(o)}));return e&&Object(c.a)((i=Object(a.a)(l),Object(s.a)(n.prototype)),"destroy",i).call(i),l.isVisible=!1,t},l._backdrop=new p.a({lockScrolling:!0,lockFocus:!0,lockFocusOn:l._iframe,listenerRegistry:_}),l._autoMount(),l.isVisible=!1,l}return n}(l.a);t.a=f},function(e,t,n){"use strict";var r=n(11);t.a=function e(t,n){var a=[];return Object.keys(t).forEach((function(o){var i=t[o],c=n?"".concat(n,"[").concat(o,"]"):o;if(i&&"object"==typeof i){var s=e(i,c);""!==s&&(a=[].concat(Object(r.a)(a),[s]))}else null!=i&&(a=[].concat(Object(r.a)(a),["".concat(c,"=").concat(encodeURIComponent(String(i)))]))})),a.join("&").replace(/%20/g,"+")}},function(e,t,n){"use strict";n.d(t,"a",(function(){return a}));var r=n(19),a=function(){var e=[];return{addEventListener:function(t,n,r,a){t.addEventListener(n,r,a),e.push([t,n,r,a])},removeEventListener:function(t,n,a,o){t.removeEventListener(n,a,o),e=e.filter((function(e){return function(e,t){var n=Object(r.a)(e,4),a=n[0],o=n[1],i=n[2],c=n[3],s=Object(r.a)(t,4),u=s[0],l=s[1],p=s[2],d=s[3];return u!==a||l!==o||p!==i||!0===("object"==typeof c&&c?c.capture:c)!=(!0===("object"==typeof d&&d?d.capture:d))}([t,n,a,o],e)}))}}}},function(e,t,n){"use strict";function r(e){if(Array.isArray(e))return e}n.d(t,"a",(function(){return r}))},function(e,t,n){"use strict";function r(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}n.d(t,"a",(function(){return r}))},function(e,t,n){"use strict";function r(e){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}n.d(t,"a",(function(){return r}))},function(e,t,n){"use strict";n.d(t,"b",(function(){return c})),n.d(t,"c",(function(){return s})),n.d(t,"a",(function(){return u}));var r=n(39),a=n(17),o=n(58),i=function(){return Array.prototype.slice.call(document.querySelectorAll("a[href], area[href], input:not([disabled]),\n select:not([disabled]), textarea:not([disabled]), button:not([disabled]),\n object, embed, *[tabindex], *[contenteditable]")).filter((function(e){var t=e.getAttribute("tabindex"),n=!t||parseInt(t,10)>=0,r=e.getBoundingClientRect(),a=Object(o.a)(e),i=r.width>0&&r.height>0&&a&&"hidden"!==a.getPropertyValue("visibility");return n&&i}))},c=function(e,t){var n=i();return n[Object(a.b)(n,(function(t){return t===e||e.contains(t)}))+("previous"===t?-1:1)]},s=function(e,t){return e.then((function(){return Object(a.f)(t,(function(e){var t=e.element,n=e.tabIndex;""===n?t.removeAttribute("tabindex"):t.setAttribute("tabindex",n)}))}))},u=function(e){var t=[],n=Object(a.f)(document.querySelectorAll("*"),(function(n){var r=n.getAttribute("tabindex")||"";e!==n&&(n.tabIndex=-1),t.push({element:n,tabIndex:r})})),o=Object(r.c)((function(){s(n,t)}));return{lockedPromise:n,lockedElements:t,restoreFocus:o}}},function(e,t,n){"use strict";n.d(t,"a",(function(){return r})),n.d(t,"b",(function(){return a}));var r={margin:"0",padding:"0",border:"none",display:"block",background:"transparent",position:"relative",opacity:"1"},a={border:"none",display:"block",position:"absolute",height:"1px",top:"-1px",left:"0",padding:"0",margin:"0",width:"100%",opacity:"0",background:"transparent","pointer-events":"none","font-size":"16px"}},function(e,t,n){"use strict";function r(e,t){return(r=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}n.d(t,"a",(function(){return r}))},function(e,t,n){"use strict";var r=n(16),a=n(3),o=(n(88),n(5));t.a=function e(){var t=this;Object(r.a)(this,e),this._emit=function(e){for(var n=arguments.length,r=new Array(n>1?n-1:0),a=1;a0},this._off=function(e,n){if(n){for(var r,a=t._callbacks[e],o=0;o=82||4430===t&&n>=11||t>=4431)}()||function(){var e=/iPad|iPhone/i.test(window.navigator.userAgent),t=/^((?!chrome|android).)*safari/i.test(window.navigator.userAgent)&&!/SamsungBrowser/.test(window.navigator.userAgent);if(!e||t)return!1;var n=window.navigator.userAgent.match(/OS (\d+)_(\d+)(_\d+)? like Mac OS X/)||[],r=parseInt(n[1],10),a=parseInt(n[2],10);return!isNaN(r)&&!isNaN(a)&&(15===r&&a>=4||r>15)}())return a.a.resolve(!1);var e=window.PublicKeyCredential.isUserVerifyingPlatformAuthenticatorAvailable(),t=new a.a((function(e){return setTimeout((function(){return e(!1)}),500)}));return a.a.race([e,t]).catch((function(){return!1}))},E=function(){if(void 0===window.PaymentRequest)return a.a.resolve(!1);if(!/Chrome\/(9[5-9]|[1-9]\d\d)/.test(window.navigator.userAgent))return a.a.resolve(!1);try{var e=[{supportedMethods:"secure-payment-confirmation",data:{action:"authenticate",credentialIds:[new Uint8Array(1)],challenge:new Uint8Array(1),fallbackUrl:window.location,payeeOrigin:"https://stripe.com",instrument:{displayName:"Mock ····1234",icon:'data:image/svg+xml;utf8,'}}}];return new window.PaymentRequest(e,{total:{label:"Total",amount:{currency:"USD",value:"0"}}}).canMakePayment().catch((function(){return!1}))}catch(e){return a.a.resolve(!1)}},w="stripe-js-one-click-authn",S="W",k="S",A="SE/WA",P=function(e){return btoa(String.fromCharCode.apply(null,new Uint8Array(e))).replace(/\+/g,"-").replace(/\//g,"_").replace(/=/g,"")},T=function(e){return atob(e.replace(/-/g,"+").replace(/_/g,"/"))},I=function(e){var t=T(e);return Uint8Array.from(t,(function(e){return e.charCodeAt(0)}))},C=(n(79),n(80),n(81),function(e){return"data:image/svg+xml,".concat(encodeURIComponent(e.replace(/\n/g,"").replace(/\s+/g," ")))}),N=function(e){switch(e){case"visa":return C('\n \n \n \n \n');case"amex":return C('\n \n \n \n \n \n \n \n \n \n');case"mastercard":return C('\n \n \n \n \n \n \n');case"unionpay":case"discover":case"jcb":case"diners":case"unknown":case"elo":return C('');default:return Object(o.a)(e)}},R=n(9),x=function(e,t,n){var r=e.threeDS2Source,o=e.oneClickAuthn,i=t.controller,s=n.deviceSupport,u=n.startTimestamp;if(!o)return a.a.resolve(null);var l=o.credentials.filter((function(e){return e.type===R.a}));if(0===l.length)return i.report("one_click_authn.request_spc_authn.empty_credentials_list",{client_id:w,source:r,device_support:s}),a.a.resolve(null);try{var p=o.merchant.origin;if(!p)return i.report("one_click_authn.request_spc_authn.empty_merchant_origin",{client_id:w,source:r,device_support:s}),a.a.resolve(null);var d=new window.PaymentRequest(function(e,t,n){var r=n.authenticationChallenge,a=n.instrument,o=a.cardBrand,i=a.cardName,c=a.cardLast4;return n.merchant,[{supportedMethods:"secure-payment-confirmation",data:{action:"authenticate",credentialIds:e.map((function(e){return I(e.id)})),challenge:I(r),timeout:6e4,fallbackUrl:window.location.toString(),instrument:{displayName:"".concat(i," ····").concat(c),icon:N(o)},payeeOrigin:t}}]}(l,p,o),{total:{label:"Total",amount:o.amount}});return i.report("one_click_authn.request_spc_authn.prompted",{client_id:w,source:r,timeToComplete:u.getElapsedTime(),device_support:s}),d.show().then((function(e){var t;return e.complete("success"),i.report("one_click_authn.request_spc_authn.completed",{client_id:w,source:r,timeToComplete:u.getElapsedTime(),device_support:s}),{type:R.a,assertion:(t=e.details,{type:"public-key",id:t.id,raw_id:t.id,response:{authenticator_data:P(t.response.authenticatorData),client_data_json:P(t.response.clientDataJSON),signature:P(t.response.signature)}}),payment_data:{merchant_data:{merchant_origin:p,total:o.amount},network_data:o.authenticationChallenge}}})).catch((function(e){var t={AbortError:"request_aborted",InvalidStateError:"payment_already_shown",NotSupportedError:"payment_method_not_supported",SecurityError:"security_error"}[e.name]||"unexpected_error";return i.report("one_click_authn.request_spc_authn.error",{reason:t,client_id:w,source:r,timeToError:u.getElapsedTime(),device_support:s,error:Object(c.a)({name:e.name,message:e.message},e)}),null}))}catch(e){i.report("one_click_authn.request_spc_authn.error",{client_id:w,reason:"unexpected_error",source:r,timeToError:u.getElapsedTime(),device_support:s,error:Object(c.a)({name:e.name,message:e.message},e)})}return a.a.resolve(null)},M=function(e,t,n){var r=t.controller,o=n.deviceSupport,i=n.challengeFrame,c=n.startTimestamp,s=e.oneClickAuthn;if(!s)return a.a.resolve(null);var l=function(e){var t=e.spcEligible,n=e.configurationType;return t&&(n===k||n===A)}(o)?R.a:R.b,p=s.credentials.filter((function(e){return e.type===l}));return 0===p.length?(r.report("one_click_authn.request_webauthn_authn.empty_credentials_list",{client_id:w,source:e.threeDS2Source,device_support:o}),a.a.resolve(null)):new a.a((function(t,n){i.then((function(r){var a=function(){return n(new Error("User canceled"))};r._once("cancel",a),r.isVisible||(r.show(),r.fadeInBackdrop());var i={amount:s.amount,instrument:s.instrument,merchant:s.merchant,authenticationChallenge:s.authenticationChallenge,layout:s.layout,allowCredentials:p};return r.action.performOneClickWebauthnAuthentication({threeDS2Source:e.threeDS2Source,cardBrand:e.cardBrand,appUrl:Object(u.a)("one-click-webauthn-authentication-f0f17efd231ab9e33ff14092b4ffb4d2.html"),deviceSupport:o,payload:i,startPosixTime:c.getAsPosixTime()}).then((function(e){r._off("cancel",a),t(e)}))}))}))},L=function(e,t){var n=e.threeDS2Source,r=e.oneClickAuthn,a=t.controller;if(!r)return null;var o=g.i?"safari":g.f?"firefox":g.c?g.a?"chrome_android":"chrome":g.e||g.d?"edge":null;if(!o)return a.report("one_click_authn.configuration.error",{client_id:w,reason:"browser_not_found",source:n}),null;try{switch(new URLSearchParams(T(r.configuration)).get(o)){case S:return S;case k:return k;case A:return A;default:return null}}catch(e){return a.report("one_click_authn.configuration.error",{client_id:w,reason:"unexpected_error",source:n,error:Object(c.a)({name:e.name,message:e.message},e)}),null}},D=function(){try{return 0==="https://js.stripe.com/v3/".indexOf(window.top.location.origin)}catch(e){return!1}},q=function(){var e=document.featurePolicy;if(!e)return!1;try{return-1!==e.allowedFeatures().indexOf("publickey-credentials-get")}catch(e){return!1}},B=function(e,t){return a.a.all([E(),j()]).then((function(n){var a=Object(r.a)(n,2),o=a[0],i=a[1];return{sameOriginFrame:D(),spcEligible:o,webauthnEligible:i,publickeyCredentialsGetAllowed:q(),configurationType:L(e,t)}}))},F=function(e,t,n){var r=n.challengeFrame,a=n.startTimestamp;return B(e,t).then((function(n){return i=(o=n).webauthnEligible,c=o.configurationType,!i||c!==S&&c!==A?function(e){var t=e.spcEligible,n=e.configurationType;return t&&n===k}(n)?x(e,t,{deviceSupport:n,startTimestamp:a}).then((function(e){return{deviceSupport:n,authenticationAPIParam:e}})):{deviceSupport:n,authenticationAPIParam:null}:M(e,t,{deviceSupport:n,challengeFrame:r,startTimestamp:a}).then((function(e){return{deviceSupport:n,authenticationAPIParam:e}}));var o,i,c}))},U=function(e,t,n){var c=new i.a,s=p(e,t);switch(e.type){case"3ds2-challenge":return B(e,t).then((function(r){return d(e,0,{oneClickAuthnDeviceSupport:r,challengeFrame:s}).then((function(){return y(t,{intent:h(0,t,n),challengeFrame:s,startTimestamp:c})}),(function(){return y(t,{intent:b(e,t),challengeFrame:s,startTimestamp:c})}))}));case"3ds2-fingerprint":return a.a.all([O(e,t),F(e,t,{challengeFrame:s,startTimestamp:c})]).then((function(n){var o=Object(r.a)(n,2),i=o[0],c=o[1];return function(e,t,n){var r=n.fingerprintResult,a=n.oneClickAuthn,o=t.controller,i=t.hosted,c=t.intentSecret;return o.report("3ds2.authenticate",{hosted:i,intentId:c.id}),o.action.authenticate3DS2({threeDS2Source:e.threeDS2Source,outerWindowWidth:window.innerWidth,hosted:i,fingerprintResult:r,oneClickAuthnDeviceSupportAPIParam:{hosted:i,same_origin_frame:a.deviceSupport.sameOriginFrame,spc_eligible:a.deviceSupport.spcEligible,webauthn_eligible:a.deviceSupport.webauthnEligible,publickey_credentials_get_allowed:a.deviceSupport.publickeyCredentialsGetAllowed},oneClickAuthnAuthenticationAPIParam:a.authenticationAPIParam}).then((function(e){return"error"===e.type?o.report("3ds2.authenticate.error",{error:e.error,hosted:i,intentId:c.id}):o.report("3ds2.authenticate.success",{hosted:i,intentId:c.id}),e}))}(e,t,{fingerprintResult:i,oneClickAuthn:c}).then((function(n){return function(e,t,n){var r=n.authenticateResponse,o=n.oneClickAuthnDeviceSupport,i=n.challengeFrame,c=t.controller,s=t.hosted,u=t.intentSecret;if("error"===r.type)return a.a.resolve();var l=r.object,p=l.state,f=l.ares,m=l.creq;return"delegated"===p||null===f?a.a.resolve():"C"!==f.transStatus||null==m?(c.report("3ds2.frictionless",{hosted:s,intentId:u.id}),a.a.resolve()):d({type:"3ds2-challenge",threeDS2Source:e.threeDS2Source,cardBrand:e.cardBrand,transactionId:e.transactionId,acsUrl:f.acsURL,acsTransactionId:f.acsTransID,optimizations:e.optimizations,oneClickAuthn:e.oneClickAuthn,creq:m},0,{oneClickAuthnDeviceSupport:o,challengeFrame:i})}(e,t,{authenticateResponse:n,oneClickAuthnDeviceSupport:c.deviceSupport,challengeFrame:s})}))})).then((function(){return y(t,{intent:h(0,t,n),challengeFrame:s,startTimestamp:c})}),(function(){return y(t,{intent:b(e,t),challengeFrame:s,startTimestamp:c})}));default:return Object(o.a)(e)}}},function(e,t,n){"use strict";n.d(t,"a",(function(){return s}));var r=n(2),a=n(9),o=n(37),i=n(12),c=function e(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:3,a=arguments.length>2&&void 0!==arguments[2]?arguments[2]:250;return new r.a((function(r,o){t().then(r).catch((function(i){1===n?o(i):setTimeout((function(){e(t,n-1,a).then(r,o)}),a)}))}))},s=function(e){var t=e.controller,n=e.intentSecret,s=e.intentType,u=(e.locale,function(e){return t.action.localizeError(e).then((function(e){return r.a.resolve({error:e})}))}),l=function(e,t){switch(t){case"requires_action":return e;case"requires_payment_method":return u(i.a);default:return e}};return"PAYMENT_INTENT"===s?Object(o.d)(n.clientSecret,n.id,t).then((function(e){return e.error?u(i.b):c((function(){return t.action.refreshPaymentIntent({intentSecret:n}).then((function(e){if("error"===e.type&&429===e.error.status)return r.a.reject(new Error(e.error.message));var t=Object(a.g)(e);return t.paymentIntent?l(t,t.paymentIntent.status):t}))}),5,500)})):Object(o.f)(n.clientSecret,n.id,t).then((function(e){return e.error?u(i.b):c((function(){return t.action.refreshSetupIntent({intentSecret:n}).then((function(e){if("error"===e.type&&429===e.error.status)return r.a.reject(new Error(e.error.message));var t=Object(a.h)(e);return t.setupIntent?l(t,t.setupIntent.status):t}))}),5,500)}))}},function(e,t,n){"use strict";n.d(t,"a",(function(){return o}));var r=n(20),a=n(39),o=function(){var e=Object(r.a)(),t=e.style.overflow;e.style.overflow="hidden";var n={passive:!1},o=function(e){return e.preventDefault()},i=function(){};return window.addEventListener("touchmove",i,n),e.addEventListener("touchstart",i,n),e.addEventListener("touchmove",o,n),Object(a.c)((function(){e.style.overflow=t||"",window.removeEventListener("touchmove",i,n),e.removeEventListener("touchstart",i,n),e.removeEventListener("touchmove",o,n)}))}},function(e,t,n){"use strict";var r=n(85);function a(){}var o=null,i={};function c(e){if("object"!=typeof this)throw new TypeError("Promises must be constructed via new");if("function"!=typeof e)throw new TypeError("not a function");this._45=0,this._81=0,this._65=null,this._54=null,e!==a&&f(e,this)}function s(e,t){for(;3===e._81;)e=e._65;if(c._10&&c._10(e),0===e._81)return 0===e._45?(e._45=1,void(e._54=t)):1===e._45?(e._45=2,void(e._54=[e._54,t])):void e._54.push(t);!function(e,t){r((function(){var n=1===e._81?t.onFulfilled:t.onRejected;if(null!==n){var r=function(e,t){try{return e(t)}catch(e){return o=e,i}}(n,e._65);r===i?l(t.promise,o):u(t.promise,r)}else 1===e._81?u(t.promise,e._65):l(t.promise,e._65)}))}(e,t)}function u(e,t){if(t===e)return l(e,new TypeError("A promise cannot be resolved with itself."));if(t&&("object"==typeof t||"function"==typeof t)){var n=function(e){try{return e.then}catch(e){return o=e,i}}(t);if(n===i)return l(e,o);if(n===e.then&&t instanceof c)return e._81=3,e._65=t,void p(e);if("function"==typeof n)return void f(n.bind(t),e)}e._81=1,e._65=t,p(e)}function l(e,t){e._81=2,e._65=t,c._97&&c._97(e,t),p(e)}function p(e){if(1===e._45&&(s(e,e._54),e._54=null),2===e._45){for(var t=0;t1)throw new f.a("stripe.redirectToCheckout: Do not provide other parameters when providing sessionId. Specify all parameters on your server when creating the CheckoutSession.");if(!/^cs_/.test(l))throw new f.a("stripe.redirectToCheckout: Invalid value for sessionId. You specified '".concat(l,"'."));if("live"===n&&/^cs_test_/.test(l))throw new f.a("stripe.redirectToCheckout: the provided sessionId is for a test mode Checkout Session, whereas Stripe.js was initialized with a live mode publishable key.");if("test"===n&&/^cs_live_/.test(l))throw new f.a("stripe.redirectToCheckout: the provided sessionId is for a live mode Checkout Session, whereas Stripe.js was initialized with a test mode publishable key.");return{tag:"session",sessionId:l}}c.sessionId,c.sku,c.plan;var d=c.items,m=c.lineItems,_=c.successUrl,b=c.cancelUrl,y=c.mode,v=Object(r.a)(c,["sessionId","sku","plan","items","lineItems","successUrl","cancelUrl","mode"]);if(!m&&!d)throw new f.a("stripe.redirectToCheckout: You must provide one of lineItems, items, or sessionId.");if(!_||!b)throw new f.a("stripe.redirectToCheckout: You must provide successUrl and cancelUrl.");return Object(a.a)({tag:"no-session",items:d,lineItems:m,successUrl:_,cancelUrl:b,mode:y},v)},O=function(e,t,n){var r=v(e,t,n);if("no-session"===r.tag){var a=r.successUrl,o=r.cancelUrl;if(!Object(m.b)(a))throw new f.a("stripe.redirectToCheckout: successUrl must start with either http:// or https://.");if(!Object(m.b)(o))throw new f.a("stripe.redirectToCheckout: cancelUrl must start with either http:// or https://.");return r}return r},g=function(e,t){return"session"===t.tag||null==e||t.locale||-1===["auto"].concat(Object(o.a)(s)).indexOf(e)?t:Object(a.a)(Object(a.a)({},t),{},{locale:e})},j=function(e,t,n){var r=Object(_.a)(l.b,(function(t){return Object(d.d)(e,t)}));if(t&&t.lineItems&&r)throw new f.a("Prices cannot be used with ".concat(r));if("string"==typeof t&&b.test(t))throw new f.a("stripe.redirectToCheckout: Checkout Session IDs must be passed in as an object with a key of `sessionId` and the Session ID as the value.");switch(r){case"checkout_beta_2":return y(0,t);case"checkout_beta_3":return v(e,t,n);case"checkout_beta_4":default:return O(e,t,n)}};t.a=function(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"unknown";return g(t,j(e,n,r))}},function(e,t,n){e.exports=n(96)},function(e,t,n){"use strict";(function(t){function n(e){a.length||(r(),!0),a[a.length]=e}e.exports=n;var r,a=[],o=0;function i(){for(;o1024){for(var t=0,n=a.length-o;t1)for(var n=1;n element.");this.autoload&&(this.loaded=!0)}},{key:"_createIFrame",value:function(e,t,r){var a=Object(_.a)(Object(h.a)(n.prototype),"_createIFrame",this).call(this,e,t,r);return a.setAttribute("aria-hidden","true"),a.setAttribute("tabIndex","-1"),Object(O.c)(a),a}}]),n}(f.a),j=function(e){Object(b.a)(n,e);var t=Object(y.a)(n);function n(){return Object(o.a)(this,n),t.apply(this,arguments)}return Object(i.a)(n,[{key:"_generateId",value:function(){return this._controllerId}}]),n}(g),E=n(23),w={border:"none",margin:"0",padding:"0",width:"1px","min-width":"100%",overflow:"hidden",display:"block","user-select":"none",transform:"translate(0)","color-scheme":"normal"},S=function(e){Object(b.a)(n,e);var t=Object(y.a)(n);function n(e){var r;return Object(o.a)(this,n),r=t.call(this,e),E.i&&r._listenerRegistry.addEventListener(document,"transitionstart",(function(e){switch(e.propertyName){case"opacity":case"transform":case"visibility":var t=e.target;r._isMounted()&&t.contains(r._iframe)&&r._forceRepaint()}}),{passive:!0}),r}return Object(i.a)(n,[{key:"update",value:function(e){this.send({action:"stripe-user-update",payload:e})}},{key:"updateStyle",value:function(e){var t=this;Object.keys(e).forEach((function(n){t._iframe.style[n]=e[n]}))}},{key:"focus",value:function(){this.loaded&&(E.i?this._iframe.focus():this.send({action:"stripe-user-focus",payload:{}}))}},{key:"blur",value:function(){this.loaded&&(this._iframe.contentWindow.blur(),this._iframe.blur(),document.activeElement===this._iframe&&(window.focus(),document.activeElement&&"function"==typeof document.activeElement.blur&&document.activeElement.blur()))}},{key:"clear",value:function(){this.send({action:"stripe-user-clear",payload:{}})}},{key:"collapse",value:function(){this.send({action:"stripe-user-collapse",payload:{}})}},{key:"_createIFrame",value:function(e,t,r){var a=Object(_.a)(Object(h.a)(n.prototype),"_createIFrame",this).call(this,e,t,r);return a.setAttribute("title","Secure payment input frame"),Object(O.d)(a,w),a}},{key:"_forceRepaint",value:function(){var e=this._iframe,t=e.style.display;e.style.display="none";var n=e.offsetHeight;return e.style.display=t,n}}]),n}(f.a),k=n(48),A={display:"block",position:"absolute","z-index":"1000",width:"1px","min-width":"100%",margin:"2px 0 0 0",padding:"0",border:"none",overflow:"hidden"},P=function(e){Object(b.a)(n,e);var t=Object(y.a)(n);function n(){return Object(o.a)(this,n),t.apply(this,arguments)}return Object(i.a)(n,[{key:"updateStyle",value:function(e){var t=this;Object.keys(e).forEach((function(n){t._iframe.style[n]=e[n]}))}},{key:"update",value:function(e){this.send({action:"stripe-user-update",payload:e})}},{key:"_createIFrame",value:function(e,t,a){var o=Object(_.a)(Object(h.a)(n.prototype),"_createIFrame",this).call(this,e,t,a&&"object"==typeof a?Object(r.a)(Object(r.a)({},a),{},{isSecondaryFrame:!0}):a);return Object(O.d)(o,A),o.style.height="0",o}}]),n}(f.a),T=n(2),I=n(42),C=["button","checkbox","file","hidden","image","submit","radio","reset"],N=function(e){var t=e.tagName;if(e.isContentEditable||"TEXTAREA"===t)return!0;if("INPUT"!==t)return!1;var n=e.getAttribute("type");return-1===C.indexOf(n)},R=n(61),x=n(5),M=n(17),L=function(e){var t=e.name,n=e.value,r=e.expiresIn,a=e.path,o=e.domain,i=e.protocol,c=e.sameSite,s=void 0===c?"Lax":c,u=new Date,l=r||31536e6;u.setTime(u.getTime()+l);var p=a||"/",d=(n||"").replace(/[^!#-+\--:<-[\]-~]/g,encodeURIComponent),f="".concat(encodeURIComponent(t),"=").concat(d,";expires=").concat(u.toGMTString(),";path=").concat(p,";SameSite=").concat(s);return o&&(f+=";domain=".concat(o)),"https:"===i&&(f+=";secure"),document.cookie=f,f},D=function(e){var t=Object(M.a)(document.cookie.split("; "),(function(t){var n=t.indexOf("=");return decodeURIComponent(t.substr(0,n))===e}));if(t){var n=t.indexOf("=");return decodeURIComponent(t.substr(n+1))}return null},q=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},B=function(e){var t={};return e.replace(/\+/g," ").split("&").forEach((function(e,n){var r,a=e.split("="),o=decodeURIComponent(a[0]),i=t,c=0,s=o.split("]["),u=s.length-1;if(/\[/.test(s[0])&&/\]$/.test(s[u])?(s[u]=s[u].replace(/\]$/,""),u=(s=s.shift().split("[").concat(s)).length-1):u=0,!(s.indexOf("__proto__")>=0))if(2===a.length)if(r=decodeURIComponent(a[1]),u)for(;c<=u;c++){if(o=""===s[c]?i.length:s[c],!q(i,o)&&i[o])return;i[o]=c0&&void 0!==arguments[0]?arguments[0]:{};if(Object(o.a)(this,e),this._controllerFrame=null,this._latencies=[],this._handleMessage=function(e){return function(n){var r=n.data,a=n.origin;if(Object(I.c)(a)&&"string"==typeof r)try{var o=JSON.parse(r),i=o.originatingScript,c=o.payload;if("m2"===i){var s=c.guid,u=c.muid,l=c.sid;t._guid=s,t._muid=t._getID(ee,u),t._sid=t._getID(te,l),e()}}catch(e){}}},n.checkoutIds){var r=n.checkoutIds,a=r.muid,i=r.sid;this._guid=ne,this._muid=a,this._sid=i,this._doNotPersist="NA"!==a&&"NA"!==i}else this._guid=ne,this._muid=this._getID(ee),this._sid=this._getID(te),this._doNotPersist=!1;this._listenerRegistry=Object(X.a)(),this._idsPromise=new T.a((function(e){t._establishMessageChannel(e)})),this._id=Object(d.a)(Q),$&&(this._controllerFrame=new j({type:l.c.METRICS_CONTROLLER,controllerId:this._id,listenerRegistry:this._listenerRegistry,autoload:!0,appParams:this._buildFrameQueryString()}),this._startIntervalCheck(),setTimeout(this._testLatency.bind(this),2e3+500*Math.random()))}return Object(i.a)(e,[{key:"ids",value:function(){return{guid:this._guid,muid:this._muid,sid:this._sid}}},{key:"idsPromise",value:function(){var e=this;return this._idsPromise.then((function(){return e.ids()}))}},{key:"_establishMessageChannel",value:function(e){if(!$)return this._guid=Object(d.b)(),void e();this._listenerRegistry.addEventListener(window,"message",this._handleMessage(e))}},{key:"_startIntervalCheck",value:function(){var e=this,t=window.location.href;setInterval((function(){var n=window.location.href;n!==t&&(e.send((function(e){return{action:"ping",payload:{sid:e.sid,muid:e.muid,title:document.title,referrer:document.referrer,url:document.location.href,version:6}}})),t=n)}),5e3)}},{key:"report",value:function(e,t){this.send((function(n){return{action:"track",payload:{sid:n.sid,muid:n.muid,url:document.location.href,source:e,data:t,version:6}}}))}},{key:"send",value:function(e){var t=this;this._idsPromise.then((function(){try{t._controllerFrame&&t._controllerFrame.send(e(t.ids()))}catch(e){}}))}},{key:"_testLatency",value:function(){var e=this,t=new Date;this._listenerRegistry.addEventListener(document,"mousemove",(function n(){try{var r=new Date;e._latencies.push(r-t),e._latencies.length>=10&&(e.report("mouse-timings-10",e._latencies),e._listenerRegistry.removeEventListener(document,"mousemove",n)),t=r}catch(e){}}))}},{key:"_extractMetaReferrerPolicy",value:function(){var e=document.querySelector("meta[name=referrer]");return null!=e&&e instanceof HTMLMetaElement?e.content.toLowerCase():null}},{key:"_extractUrl",value:function(e){var t=document.location.href;switch(e){case"origin":case"strict-origin":case"origin-when-cross-origin":case"strict-origin-when-cross-origin":return document.location.origin;case"unsafe-url":return t.split("#")[0];default:return t}}},{key:"_buildFrameQueryString",value:function(){var e=this._extractMetaReferrerPolicy(),t=this._extractUrl(e),n={url:t,title:document.title,referrer:document.referrer,muid:this._muid,sid:this._sid,version:6,preview:Object(I.c)(t)};return null!=e&&(n.metaReferrerPolicy=e),Object.keys(n).map((function(e){return null!=n[e]?"".concat(e,"=").concat(encodeURIComponent(n[e].toString())):null})).join("&")}},{key:"_getID",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:ne;switch(e){case ee:if(this._doNotPersist)return ae(this._muid,t,$);try{var n="__stripe_mid",r=ae(D(n),t,$);return re(r)&&L({name:n,value:r,domain:".".concat(document.location.hostname),protocol:document.location.protocol,sameSite:"Strict"}),r}catch(e){return ne}case te:if(this._doNotPersist)return ae(this._sid,t,$);try{var a="__stripe_sid",o=ae(D(a),t,$);return re(o)&&L({name:a,value:o,domain:".".concat(document.location.hostname),protocol:document.location.protocol,sameSite:"Strict",expiresIn:18e5}),o}catch(e){return ne}default:throw new Error("Invalid ID type specified: ".concat(e))}}}]),e}(),ie=null,ce=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return ie=new oe(e)},se=!1,ue=function(){var e=ie;e&&(se||(se=!0,e.send((function(e){return{action:"ping",payload:{v2:2,sid:e.sid,muid:e.muid,title:document.title,referrer:document.referrer,url:document.location.href,version:6}}})),e.send((function(t){return{action:"track",payload:{sid:t.sid,muid:t.muid,url:document.location.href,source:"mouse-timings-10-v2",data:e._latencies,version:6}}}))))},le=n(18),pe=!1,de=function(e){pe||"null"===(null!=e?e:window.origin)&&(pe=!0,console.error("Stripe.js requires 'allow-same-origin' if sandboxed."))},fe=n(40),me=!1,_e={},he=function(e,t){return document.activeElement===e._iframe||e._iframe.parentElement&&document.activeElement===t},be=function(e){return"object"==typeof e&&null!==e&&"IntegrationError"===e.name?new v.a("string"==typeof e.message?e.message:""):e},ye=function(){function e(t){var n=this;Object(o.a)(this,e),this._sendCAReq=function(e){var t=Object(d.a)(e.tag);return new T.a((function(r,a){n._requests[t]={resolve:r,reject:a},n._controllerFrame.send({action:"stripe-safe-controller-action-request",payload:{nonce:t,caReq:e}})}))},this.keyMode=function(){return Object(p.c)(n._apiKey)},this.action={retrievePaymentIntent:function(e){return n._sendCAReq({tag:"RETRIEVE_PAYMENT_INTENT",value:e})},confirmPaymentIntent:function(e){return n._sendCAReq({tag:"CONFIRM_PAYMENT_INTENT",value:e})},createConsumerPaymentDetails:function(e){return n._sendCAReq({tag:"CREATE_CONSUMER_PAYMENT_DETAILS",value:e})},completeLinkPayment:function(e){return n._sendCAReq({tag:"COMPLETE_LINK_PAYMENT",value:e})},completeLinkSetup:function(e){return n._sendCAReq({tag:"COMPLETE_LINK_SETUP",value:e})},createBankPaymentDetails:function(e){return n._sendCAReq({tag:"CREATE_BANK_PAYMENT_DETAILS",value:e})},cancelPaymentIntentSource:function(e){return n._sendCAReq({tag:"CANCEL_PAYMENT_INTENT_SOURCE",value:e})},confirmSetupIntent:function(e){return n._sendCAReq({tag:"CONFIRM_SETUP_INTENT",value:e})},submitOrder:function(e){return n._sendCAReq({tag:"SUBMIT_ORDER",value:e})},retrieveOrder:function(e){return n._sendCAReq({tag:"RETRIEVE_ORDER",value:e})},retrieveSetupIntent:function(e){return n._sendCAReq({tag:"RETRIEVE_SETUP_INTENT",value:e})},cancelSetupIntentSource:function(e){return n._sendCAReq({tag:"CANCEL_SETUP_INTENT_SOURCE",value:e})},lookupLocale:function(e){return n._sendCAReq({tag:"LOOKUP_LOCALE",value:e})},fetchLocale:function(e){return n._sendCAReq({tag:"FETCH_LOCALE",value:e})},updateCSSFonts:function(e){return n._sendCAReq({tag:"UPDATE_CSS_FONTS",value:e})},createApplePaySession:function(e){return n._sendCAReq({tag:"CREATE_APPLE_PAY_SESSION",value:e})},retrieveSource:function(e){return n._sendCAReq({tag:"RETRIEVE_SOURCE",value:e})},tokenizeWithElement:function(e){return n._sendCAReq({tag:"TOKENIZE_WITH_ELEMENT",value:e})},tokenizeCvcUpdate:function(e){return n._sendCAReq({tag:"TOKENIZE_CVC_UPDATE",value:e})},tokenizeWithData:function(e){return n._sendCAReq({tag:"TOKENIZE_WITH_DATA",value:e})},createSourceWithElement:function(e){return n._sendCAReq({tag:"CREATE_SOURCE_WITH_ELEMENT",value:e})},createSourceWithData:function(e){return n._sendCAReq({tag:"CREATE_SOURCE_WITH_DATA",value:e})},createPaymentMethodWithElement:function(e){return n._sendCAReq({tag:"CREATE_PAYMENT_METHOD_WITH_ELEMENT",value:e})},createPaymentMethodWithData:function(e){return n._sendCAReq({tag:"CREATE_PAYMENT_METHOD_WITH_DATA",value:e})},createPaymentPage:function(e){return n._sendCAReq({tag:"CREATE_PAYMENT_PAGE",value:e})},createPaymentPageWithSession:function(e){return n._sendCAReq({tag:"CREATE_PAYMENT_PAGE_WITH_SESSION",value:e})},createRadarSession:function(e){return n._sendCAReq({tag:"CREATE_RADAR_SESSION",value:e})},authenticate3DS2:function(e){return n._sendCAReq({tag:"AUTHENTICATE_3DS2",value:e})},verifyMicrodepositsForPayment:function(e){return n._sendCAReq({tag:"VERIFY_MICRODEPOSITS_FOR_PAYMENT",value:e})},verifyMicrodepositsForSetup:function(e){return n._sendCAReq({tag:"VERIFY_MICRODEPOSITS_FOR_SETUP",value:e})},retrieveIssuingCardWithoutNonce:function(e){return n._sendCAReq({tag:"RETRIEVE_ISSUING_CARD_WITHOUT_NONCE",value:e})},retrieveIssuingCard:function(e){return n._sendCAReq({tag:"RETRIEVE_ISSUING_CARD",value:e})},createEphemeralKeyNonce:function(e){return n._sendCAReq({tag:"CREATE_EPHEMERAL_KEY_NONCE",value:e})},updatePaymentIntent:function(e){return n._sendCAReq({tag:"UPDATE_PAYMENT_INTENT",value:e})},createAcssDebitSession:function(e){return n._sendCAReq({tag:"CREATE_ACSS_DEBIT_SESSION",value:e})},confirmReturnIntent:function(e){return n._sendCAReq({tag:"CONFIRM_RETURN_INTENT",value:e})},refreshPaymentIntent:function(e){return n._sendCAReq({tag:"REFRESH_PAYMENT_INTENT",value:e})},refreshSetupIntent:function(e){return n._sendCAReq({tag:"REFRESH_SETUP_INTENT",value:e})},attachLinkAccountSessionForPayment:function(e){return n._sendCAReq({tag:"ATTACH_LINK_ACCOUNT_SESSION_FOR_PAYMENT",value:e})},attachLinkAccountSessionForSetup:function(e){return n._sendCAReq({tag:"ATTACH_LINK_ACCOUNT_SESSION_FOR_SETUP",value:e})},localizeError:function(e){return n._sendCAReq({tag:"LOCALIZE_ERROR",value:e})},setupStoreForElementsGroup:function(e){return n._sendCAReq({tag:"SETUP_STORE_FOR_ELEMENTS_GROUP",value:e})},updateElementsOptions:function(e){return n._sendCAReq({tag:"UPDATE_ELEMENTS_OPTIONS",value:e})},completeWalletConfirm:function(e){return n._sendCAReq({tag:"COMPLETE_WALLET_CONFIRM",value:e})},completeLinkAccountSessionElements:function(e){return n._sendCAReq({tag:"COMPLETE_LINK_ACCOUNT_SESSION_ELEMENTS",value:e})},verifyCardImageVerificationChallenge:function(e){return n._sendCAReq({tag:"VERIFY_CARDIMAGEVERIFICATION_CHALLENGE",value:e})},cancelCardImageVerificationChallenge:function(e){return n._sendCAReq({tag:"CANCEL_CARDIMAGEVERIFICATION_CHALLENGE",value:e})}},this.createElementFrame=function(e,t,a,o){var i=n._betas,c=new S({type:e,betas:i,controllerId:n._id,listenerRegistry:n._listenerRegistry,appParams:Object(r.a)(Object(r.a)({},o),{},{componentName:t,keyMode:Object(p.c)(n._apiKey),apiKey:n._apiKey})});return n._setupFrame(c,e,a)},this.createSecondaryElementFrame=function(e,t,a,o,i){var c=n._betas,s=new P({type:e,betas:c,controllerId:n._id,listenerRegistry:n._listenerRegistry,appParams:Object(r.a)(Object(r.a)({},i),{},{componentName:t,primaryElementType:a,keyMode:Object(p.c)(n._apiKey)})});return n._setupFrame(s,e,o)},this.createHiddenFrame=function(e,t){var r=new g({type:e,betas:n._betas,controllerId:n._id,listenerRegistry:n._listenerRegistry,appParams:t});return n._setupFrame(r,e)},this.getCredentials=function(){return{publishableKey:n._apiKey,stripeAccount:n._stripeAccount,apiVersion:n._apiVersion}},this.createLightboxFrame=function(e){var t=e.type,a=e.options,o=new k.a({type:t,controllerId:n._id,listenerRegistry:n._listenerRegistry,options:Object(r.a)(Object(r.a)({},a),{},{betas:n._betas})}),i="LINK_AUTOFILL_MODAL"===e.type?e.groupId:null;return n._setupFrame(o,t,i)},this._setupFrame=function(e,t,r){return n._frames[e.id]=e,n._controllerFrame.sendPersistent({action:"stripe-user-createframe",payload:{newFrameId:e.id,frameType:t,groupId:r}}),e._on("unload",(function(){n._controllerFrame.sendPersistent({action:"stripe-frame-unload",payload:{unloadedFrameId:e.id}})})),e._on("destroy",(function(){delete n._frames[e.id],n._controllerFrame.sendPersistent({action:"stripe-frame-destroy",payload:{destroyedFrameId:e.id}})})),e._on("load",(function(){n._controllerFrame.sendPersistent({action:"stripe-frame-load",payload:{loadedFrameId:e.id}}),n._controllerFrame.loaded&&e.send({action:"stripe-controller-load",payload:{}})})),e},this.report=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};n._controllerFrame.send({action:"stripe-controller-report",payload:{event:e,data:t}})},this.warn=function(){for(var e=arguments.length,t=new Array(e),r=0;r0&&void 0!==arguments[0]?arguments[0]:Me,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Le,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"0",r=De(n);if("string"==typeof e&&/^[0-9.]+px$/.test(e)){var a=parseFloat(e.toString().replace(/[^0-9.]/g,""));return"".concat(a+r,"px")}var o,i=parseFloat(e.toString().replace(/[^0-9.]/g,"")),c=parseFloat(Le.replace(/[^0-9.]/g,"")),s=parseFloat(t.toString().replace(/[^0-9.]/g,""));if("string"==typeof t&&/^(\d+|\d*\.\d+)px$/.test(t))o=s;else if("string"==typeof t&&/^(\d+|\d*\.\d+)em$/.test(t))o=s*c;else if("string"==typeof t&&/^(\d+|\d*\.\d+)%$/.test(t))o=s/100*c;else{if("string"!=typeof t||!/^[\d.]+$/.test(t)&&!/^\d*\.(px|em|%)$/.test(t))return"100%";o=c}var u=i*o+r,l="".concat(u,"px");return/^[0-9.]+px$/.test(l)?l:"100%"},Be=n(58),Fe=function(e,t){return e.reduce((function(e,n){return e.then((function(e){return"SATISFIED"===e.type?e:n().then((function(e){return t(e)?{type:"SATISFIED",value:e}:{type:"UNSATISFIED"}}))}))}),T.a.resolve({type:"UNSATISFIED"}))},Ue="40px",Ge={success:"success",fail:"fail",invalid_shipping_address:"invalid_shipping_address"},He={shipping:"shipping",delivery:"delivery",pickup:"pickup"},ze=Object(r.a)({success:"success"},{fail:"fail",invalid_payer_name:"invalid_payer_name",invalid_payer_email:"invalid_payer_email",invalid_payer_phone:"invalid_payer_phone",invalid_shipping_address:"invalid_shipping_address"}),Ye={merchantCapabilities:["supports3DS"],displayItems:[]},Ke=Object(u.u)({amount:u.k,label:u.x,pending:Object(u.s)(u.b)}),We=Object(u.u)({amount:u.c,label:u.x,pending:Object(u.s)(u.b)}),Ve=Object(u.u)({amount:u.c,label:u.x,pending:Object(u.s)(u.b),id:Object(u.G)(u.x,(function(){return Object(d.a)("shippingOption")})),detail:Object(u.G)(u.x,(function(){return""}))}),Je=u.q.apply(void 0,Object(a.a)(Object.keys(He))),$e=Object(u.u)({origin:u.x,name:u.x}),Ze=Object(u.u)({displayItems:Object(u.s)(Object(u.a)(We)),shippingOptions:Object(u.s)(Object(u.C)("id")(Object(u.a)(Ve))),wallets:Object(u.s)(Object(u.a)(u.A)),disableWallets:Object(u.s)(Object(u.a)(u.A)),total:Ke,requestShipping:Object(u.s)(u.b),requestPayerName:Object(u.s)(u.b),requestPayerEmail:Object(u.s)(u.b),requestPayerPhone:Object(u.s)(u.b),shippingType:Object(u.s)(Je),currency:u.z,country:u.y,jcbEnabled:Object(u.s)(u.b),__billingDetailsEmailOverride:Object(u.s)(u.x),__minApplePayVersion:Object(u.s)(u.n),__merchantDetails:Object(u.s)($e),__isCheckout:Object(u.s)(u.b),__betas:Object(u.s)(Object(u.a)(u.r.apply(void 0,Object(a.a)(je.c))))}),Xe=Object(u.d)({currency:Object(u.s)(u.z),displayItems:Object(u.s)(Object(u.a)(We)),shippingOptions:Object(u.s)(Object(u.C)("id")(Object(u.a)(Ve))),total:Object(u.s)(Ke)}),Qe=Object(u.u)({displayItems:Object(u.s)(Object(u.a)(We)),shippingOptions:Object(u.s)(Object(u.C)("id")(Object(u.a)(Ve))),total:Object(u.s)(Ke),status:function(e,t){return u.q.apply(void 0,Object(a.a)(Object.keys(Ge)))(-1!==["invalid_payer_name","invalid_payer_email","invalid_payer_phone"].indexOf(e)?"fail":e,t)}}),et=u.q.apply(void 0,Object(a.a)(Object.keys(ze))),tt=n(41),nt=function(){return window.ApplePaySession?["APPLE_PAY"]:["GOOGLE_PAY","BROWSER"]},rt=function(e){var t=[];return window.ApplePaySession?Object(tt.b)(e,tt.a.applePay)&&t.push("APPLE_PAY"):(Object(tt.b)(e,tt.a.googlePay)&&(t.push("GOOGLE_PAY"),E.a&&t.push("BROWSER")),Object(tt.b)(e,tt.a.browserCard)&&-1===t.indexOf("BROWSER")&&t.push("BROWSER")),t},at=n(39),ot=function(){try{return window.location.origin===window.top.location.origin}catch(e){return!1}},it=Object(at.b)((function(e){return window.ApplePaySession.canMakePaymentsWithActiveCard(e)})),ct=function(){return T.a.resolve(window.ApplePaySession.canMakePayments())},st=function(e){if(!window.ApplePaySession)return!1;try{return window.ApplePaySession.supportsVersion(e)}catch(e){return!1}},ut=["mastercard","visa"],lt=["AT","AU","BE","CA","CH","DE","DK","EE","ES","FI","FR","GB","GR","HK","IE","IT","JP","LT","LU","LV","MX","NL","NO","NZ","PL","PT","SE","SG","US"],pt=function(e,t){var n="US"===e||t?["discover","diners","jcb"].concat(ut):ut;return-1!==lt.indexOf(e)?["amex"].concat(Object(a.a)(n)):n},dt={bif:1,clp:1,djf:1,gnf:1,jpy:1,kmf:1,krw:1,mga:1,pyg:1,rwf:1,vnd:1,vuv:1,xaf:1,xof:1,xpf:1,bhd:1e3,jod:1e3,kwd:1e3,omr:1e3,tnd:1e3},ft=function(e,t){var n=function(e){var t=dt[e.toLowerCase()]||100;return{unitSize:1/t,fractionDigits:Math.ceil(Math.log(t)/Math.log(10))}}(t),r=n.unitSize,a=n.fractionDigits;return(e*r).toFixed(a)},mt=function(e,t){return{amount:ft(e.amount,t.currency),label:e.label,type:e.pending?"pending":"final"}},_t=function(e,t){return new window.ApplePayError(e,t)},ht=function(e){return function(t){return t[e]&&"string"==typeof t[e]?t[e].toUpperCase():null}},bt=(z={},Object(c.a)(z,ze.success,0),Object(c.a)(z,ze.fail,1),Object(c.a)(z,ze.invalid_payer_name,2),Object(c.a)(z,ze.invalid_shipping_address,3),Object(c.a)(z,ze.invalid_payer_phone,4),Object(c.a)(z,ze.invalid_payer_email,4),z),yt=(Y={},Object(c.a)(Y,ze.success,(function(){return null})),Object(c.a)(Y,ze.fail,(function(){return null})),Object(c.a)(Y,ze.invalid_payer_name,(function(){return _t("billingContactInvalid","name")})),Object(c.a)(Y,ze.invalid_shipping_address,(function(){return _t("shippingContactInvalid","postalAddress")})),Object(c.a)(Y,ze.invalid_payer_phone,(function(){return _t("shippingContactInvalid","phoneNumber")})),Object(c.a)(Y,ze.invalid_payer_email,(function(){return _t("shippingContactInvalid","emailAddress")})),Y),vt=(K={},Object(c.a)(K,He.pickup,"storePickup"),Object(c.a)(K,He.shipping,"shipping"),Object(c.a)(K,He.delivery,"delivery"),K),Ot={total:function(e){return mt(e.total,e)},lineItems:function(e){return e.displayItems?e.displayItems.map((function(t){return mt(t,e)})):[]},shippingMethods:function(e){return e.shippingOptions?e.shippingOptions.map((function(t){return function(e,t){return{amount:ft(e.amount,t.currency),label:e.label,detail:e.detail,identifier:e.id}}(t,e)})):[]},applicationData:function(e){return e.applicationData||null}},gt={shippingType:function(e){var t=e.shippingType;if(!t)return null;var n=vt[t];if(void 0!==n)return n;throw new v.a("Invalid value for shippingType: ".concat(t))},requiredBillingContactFields:function(e){return e.requestPayerName?["postalAddress"]:null},requiredShippingContactFields:function(e){var t=[];return e.requestShipping&&t.push("postalAddress"),e.requestPayerEmail&&t.push("email"),e.requestPayerPhone&&t.push("phone"),t.length?t:null},countryCode:ht("country"),currencyCode:ht("currency"),merchantCapabilities:function(e){var t=e.merchantCapabilities||Ye.merchantCapabilities;return e.__betas&&Object(je.d)(e.__betas,"cup_apple_pay_beta_1")&&t.push("supportsEMV"),t},supportedNetworks:function(e){var t,n,r=(t=e.country,n=e.jcbEnabled||!1,pt(t,n).reduce((function(e,t){return"mastercard"===t?[].concat(Object(a.a)(e),["masterCard"]):"diners"===t?e:[].concat(Object(a.a)(e),[t])}),[]));return st(4)&&r.push("maestro"),e.__betas&&Object(je.d)(e.__betas,"cup_apple_pay_beta_1")&&r.push("chinaUnionPay"),r}},jt={status:function(e){var t=bt[e.status];return st(3)&&t>1?1:t},error:function(e){return st(3)?yt[e.status]():null}},Et=Object(r.a)(Object(r.a)({},Ot),gt),wt=Object(r.a)(Object(r.a)({},Ot),jt),St=function(e){return Object.keys(wt).reduce((function(t,n){var a=(0,wt[n])(e);return null!==a?Object(r.a)(Object(r.a)({},t),{},Object(c.a)({},n,a)):t}),{})},kt=function(e){return"string"==typeof e?e:null},At=function(e){return e?kt(e.phoneNumber):null},Pt=function(e){return e?kt(e.emailAddress):null},Tt=function(e){return e?[e.givenName,e.familyName].filter((function(e){return e&&"string"==typeof e})).join(" "):null},It=function(e){var t=e.addressLines,n=e.countryCode,r=e.postalCode,o=e.administrativeArea,i=e.locality,c=e.phoneNumber,s=kt(n);return{addressLine:Array.isArray(t)?t.reduce((function(e,t){return"string"==typeof t?[].concat(Object(a.a)(e),[t]):e}),[]):[],country:s?s.toUpperCase():"",postalCode:kt(r)||"",recipient:Tt(e)||"",region:kt(o)||"",city:kt(i)||"",phone:kt(c)||"",sortingCode:"",dependentLocality:"",organization:""}},Ct=function(e,t){var n=e.identifier,r=e.label;return t.filter((function(e){return e.id===n&&e.label===r}))[0]},Nt=function(e,t){var n=e.shippingContact,r=e.shippingMethod,a=e.billingContact;return{shippingOption:r&&t.shippingOptions&&t.shippingOptions.length?Ct(r,t.shippingOptions):null,shippingAddress:n?It(n):null,payerEmail:Pt(n),payerPhone:At(n),payerName:Tt(a),walletName:"applePay",methodName:"apple-pay"}},Rt={austria:"AT",sterreich:"AT",csterreich:"AT",au:"AU",australia:"AU",belgium:"BE",br:"BR",brasil:"BR",brazil:"BR",ca:"CA",canada:"CA",ch:"CH",schweiz:"CH",switzerland:"CH",china:"CN",czechrepublic:"CZ",de:"DE",deutschland:"DE",germany:"DE",danmark:"DK",denmark:"DK",es:"ES",espaa:"ES",spain:"ES",finland:"FI",suomi:"FI",fr:"FR",hk:"HK",hongkong:"HK",england:"GB",gb:"GB",uk:"GB",unitedkingdom:"GB",scotland:"GB",wales:"GB",it:"IT",italy:"IT",italia:"IT",japan:"JP",lietuva:"LT",luxembourg:"LU",netherlands:"NL",nederland:"NL",norway:"NO",poland:"PL",polska:"PL",russia:"RU",saudiarabia:"SA",se:"SE",sweden:"SE",sverige:"SE",singapore:"SG",us:"US",usa:"US",unitedstatesofamerica:"US",unitedstates:"US",estadosunidos:"US"},xt=function(e,t){return e&&"object"==typeof e?t(e):null},Mt=function(){function e(t){var n=this;Object(o.a)(this,e),this._onEvent=function(){},this.setEventHandler=function(e){n._onEvent=e},this.canMakePayment=function(e){var t=e.skipEnrollmentChecks;return function(e,t,n,r){var a=arguments.length>4&&void 0!==arguments[4]?arguments[4]:2,o=arguments.length>5?arguments[5]:void 0,i=Math.max(2,a);if(window.ApplePaySession){if(ot()){if(window.ApplePaySession.supportsVersion(i)){var c="merchant.".concat((t?[e,t]:[e]).join("."),".stripe");return o?ct():it(c).then((function(a){if(r("pr.apple_pay.can_make_payment_native_response",{available:a}),n&&!a&&window.console){var o=t?"or stripeAccount parameter (".concat(t,") "):"";window.console.warn("Either you do not have a card saved to your Wallet or the current domain (".concat(e,") ").concat(o,"is not registered for Apple Pay. Visit https://dashboard.stripe.com/account/apple_pay to register this domain."))}return a}))}return n&&window.console&&window.console.warn("This version of Safari does not support ApplePay JS version ".concat(i,".")),T.a.resolve(!1)}return T.a.resolve(!1)}return T.a.resolve(!1)}(window.location.hostname,n._authentication.accountId,Object(p.c)(n._authentication.apiKey)===p.a.test,n._report,n._minimumVersion,t)},this.update=function(e){n._initialPaymentRequest=Object(M.e)(n._paymentRequestOptions,e),n._initializeSessionState()},this.show=function(){var e,t,a;n._initializeSessionState();try{e=new window.ApplePaySession(n._minimumVersion,(t=n._paymentRequestOptions,a=Object(r.a)(Object(r.a)({},Ye),t),Object.keys(Et).reduce((function(e,t){var n=(0,Et[t])(a);return null!==n?Object(r.a)(Object(r.a)({},e),{},Object(c.a)({},t,n)):e}),{})))}catch(e){throw"Must create a new ApplePaySession from a user gesture handler."===e.message?new v.a("show() must be called from a user gesture handler (such as a click handler, after the user clicks a button)."):e}n._privateSession=e,n._setupSession(e,n._usesButtonElement()),e.begin(),n._isShowing=!0},this.abort=function(){n._privateSession&&n._privateSession.abort()},this._warn=function(e){},this._report=function(e,t){n._controller.report(e,Object(r.a)(Object(r.a)({},t),{},{backingLibrary:"APPLE_PAY",usesButtonElement:n._usesButtonElement()}))},this._validateMerchant=function(e,t){return function(r){n._controller.action.createApplePaySession({data:{validation_url:r.validationURL,domain_name:window.location.hostname,display_name:n._paymentRequestOptions.total.label},usesButtonElement:t}).then((function(t){if(n._isShowing)switch(t.type){case"object":e.completeMerchantValidation(JSON.parse(t.object.session));break;case"error":n._handleValidationError(e)(t.error);break;default:Object(Re.a)(t)}}),n._handleValidationError(e))}},this._handleValidationError=function(e){return function(t){n._report("error.pr.apple_pay.session_creation_failed",{error:t}),e.abort();var r=t.message;"string"==typeof r&&n._controller.warn(r)}},this._paymentAuthorized=function(e){return function(t){var a=t.payment,o=n._usesButtonElement()?l.b.paymentRequestButton:null;n._controller.action.tokenizeWithData({type:"apple_pay",elementName:o,tokenData:Object(r.a)(Object(r.a)({},a),{},{billingContact:xt(a.billingContact,n._normalizeContact)}),mids:n._mids}).then((function(t){if("error"===t.type)e.completePayment(window.ApplePaySession.STATUS_FAILURE),n._report("error.pr.create_token_failed",{error:t.error});else{var o=xt(a.shippingContact,n._normalizeContact),i=xt(a.billingContact,n._normalizeContact);o&&n._paymentRequestOptions.requestShipping&&!o.countryCode&&e.completePayment(window.ApplePaySession.STATUS_INVALID_SHIPPING_POSTAL_ADDRESS);var c=Nt({shippingContact:o,billingContact:i},n._paymentRequestOptions);n._onToken(e)(Object(r.a)(Object(r.a)({},c),{},{shippingOption:n._privateShippingOption,token:t.object}))}}))}},this._normalizeContact=function(e){if(e.country&&"string"==typeof e.country){var t,a=e.country.toLowerCase().replace(/[^a-z]+/g,"");return e.countryCode?"string"==typeof e.countryCode&&(t=e.countryCode.toUpperCase()):(t=Rt[a])||n._report("warn.pr.apple_pay.missing_country_code",{country:e.country}),Object(r.a)(Object(r.a)({},e),{},{countryCode:t})}return e},this._onToken=function(e){return function(t){n._onEvent({type:"paymentresponse",payload:Object(r.a)(Object(r.a)({},t),{},{complete:Object(x.c)(n._completePayment(e))})})}},this._completePayment=function(e){return function(t){n._paymentRequestOptions=Object(M.e)(n._paymentRequestOptions,{status:t});var r=St(n._paymentRequestOptions),a=r.status,o=r.error;n._isShowing&&(o?e.completePayment({status:a,errors:[o]}):e.completePayment(a)),(0===a||1===a&&null==o)&&(n._isShowing=!1,n._onEvent&&n._onEvent({type:"close"}))}},this._shippingContactSelected=function(e){return function(t){n._onEvent({type:"shippingaddresschange",payload:{shippingAddress:It(n._normalizeContact(t.shippingContact)),updateWith:Object(x.c)(n._completeShippingContactSelection(e))}})}},this._completeShippingContactSelection=function(e){return function(t){var r;n._paymentRequestOptions=Object(M.e)(n._paymentRequestOptions,t),(null===(r=n._paymentRequestOptions.shippingOptions)||void 0===r?void 0:r.length)&&(n._privateShippingOption=n._paymentRequestOptions.shippingOptions[0]);var a=St(n._paymentRequestOptions),o=a.status,i=a.shippingMethods,c=a.total,s=a.lineItems;e.completeShippingContactSelection(o,i,c,s)}},this._shippingMethodSelected=function(e){return function(t){if(n._paymentRequestOptions.shippingOptions){var r=Ct(t.shippingMethod,n._paymentRequestOptions.shippingOptions);n._privateShippingOption=r,n._onEvent({type:"shippingoptionchange",payload:{shippingOption:r,updateWith:Object(x.c)(n._completeShippingMethodSelection(e))}})}}},this._completeShippingMethodSelection=function(e){return function(t){n._paymentRequestOptions=Object(M.e)(n._paymentRequestOptions,t);var r=St(n._paymentRequestOptions),a=r.status,o=r.total,i=r.lineItems;e.completeShippingMethodSelection(a,o,i)}};var a=t.controller,i=t.authentication,s=t.mids,u=t.options,d=t.usesButtonElement,f=t.listenerRegistry;this._controller=a,this._authentication=i,this._mids=s,this._minimumVersion=u.__minApplePayVersion||2,this._usesButtonElement=d,this._listenerRegistry=f,this._initialPaymentRequest=u,this._isShowing=!1,this._initializeSessionState()}return Object(i.a)(e,[{key:"_initializeSessionState",value:function(){var e=btoa(this._authentication.accountId?"".concat(this._authentication.apiKey,":").concat(this._authentication.accountId):this._authentication.apiKey);this._paymentRequestOptions=Object(r.a)(Object(r.a)(Object(r.a)({},Ye),this._initialPaymentRequest),{},{status:ze.success,applicationData:e}),this._privateSession=null,this._privateShippingOption=null;var t=this._paymentRequestOptions.shippingOptions;(null==t?void 0:t.length)&&(this._privateShippingOption=t[0])}},{key:"_setupSession",value:function(e,t){var n=this;this._listenerRegistry.addEventListener(e,"validatemerchant",Object(x.c)(this._validateMerchant(e,t))),this._listenerRegistry.addEventListener(e,"paymentauthorized",Object(x.c)(this._paymentAuthorized(e))),this._listenerRegistry.addEventListener(e,"cancel",Object(x.c)((function(){n._isShowing=!1,n._onEvent({type:"cancel"}),n._onEvent({type:"close"})}))),this._listenerRegistry.addEventListener(e,"shippingcontactselected",Object(x.c)(this._shippingContactSelected(e))),this._listenerRegistry.addEventListener(e,"shippingmethodselected",Object(x.c)(this._shippingMethodSelected(e)))}}]),e}(),Lt=n(65),Dt=null;var qt,Bt=function(e){return null!==Dt?T.a.resolve(Dt):e().then((function(e){return Dt=e}))},Ft=function(e){return!(!E.l&&!E.b)&&(!E.d&&(!(!e.isCheckout&&!window.PaymentRequest)&&!(!e.isCheckout&&E.a)))},Ut=function e(t){var n=this;Object(o.a)(this,e),this._mids=null,this._frame=null,this._initFrame=function(e){var t=n._controller.createHiddenFrame(l.c.PAYMENT_REQUEST_GOOGLE_PAY,{authentication:n._authentication,mids:n._mids,origin:n._origin});t.send({action:"stripe-pr-initialize",payload:{data:e}}),n._initFrameEventHandlers(t),n._frame=t},this._initFrameEventHandlers=function(e){e._on("pr-cancel",(function(){n._onEvent({type:"cancel"})})),e._on("pr-close",(function(){n._backdrop.fadeOut().then((function(){n._backdrop.unmount()})),n._onEvent({type:"close"})})),e._on("pr-error",(function(e){n._onEvent({type:"error",payload:{errorMessage:e.errorMessage,errorCode:e.errorCode}})})),e._on("pr-callback",(function(t){var r=t.event,a=t.options,o=t.nonce;switch(r){case"paymentresponse":n._handlePaymentResponse(e,a,o);break;case"shippingaddresschange":n._handleShippingAddressChange(e,a,o);break;case"shippingoptionchange":n._handleShippingOptionChange(e,a,o);break;default:throw new Error("Unexpected event name: ".concat(r))}}))},this._handlePaymentResponse=function(e,t,a){n._onEvent({type:"paymentresponse",payload:Object(r.a)(Object(r.a)({},t),{},{complete:function(t){e.send({action:"stripe-pr-callback-complete",payload:{nonce:a,data:{status:t}}})}})})},this._handleShippingAddressChange=function(e,t,a){n._onEvent({type:"shippingaddresschange",payload:Object(r.a)(Object(r.a)({},t),{},{updateWith:function(t){e.send({action:"stripe-pr-callback-complete",payload:{nonce:a,data:t}})}})})},this._handleShippingOptionChange=function(e,t,a){n._onEvent({type:"shippingoptionchange",payload:Object(r.a)(Object(r.a)({},t),{},{updateWith:function(t){e.send({action:"stripe-pr-callback-complete",payload:{nonce:a,data:t}})}})})},this.setEventHandler=function(e){n._onEvent=e},this.canMakePayment=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{skipEnrollmentChecks:!1},t=e.skipEnrollmentChecks;if(!Ft({isCheckout:n._isCheckout}))return T.a.resolve(!1);if(!n._frame)throw new Error("Frame not initialized.");var r=n._frame;return Bt((function(){return r.action.checkCanMakePayment({skipEnrollmentChecks:t}).then((function(e){return!0===e.available}))}))},this.show=function(){n._frame&&(n._frame.send({action:"stripe-pr-show",payload:{data:{usesButtonElement:n._usesButtonElement()}}}),n._backdrop.mount(),n._backdrop.show(),n._backdrop.fadeIn())},this.update=function(e){n._frame&&n._frame.send({action:"stripe-pr-update",payload:{data:e}})},this.abort=function(){n._frame&&n._frame.send({action:"stripe-pr-abort",payload:{}})},this._controller=t.controller,this._authentication=t.authentication,this._mids=t.mids,this._origin=t.origin,this._usesButtonElement=t.usesButtonElement,this._backdrop=new Lt.a({lockScrolling:!1,lockFocus:!0,lockFocusOn:null,listenerRegistry:t.listenerRegistry}),this._isCheckout=!!t.options.__isCheckout,Ft({isCheckout:this._isCheckout})&&this._controller&&(this._controller.action.fetchLocale({locale:"auto"}),this._initFrame(t.options))},Gt=function(){if(!window.PaymentRequest)return null;if(/CriOS\/59/.test(navigator.userAgent))return null;if(/.*\(.*; wv\).*Chrome\/(?:53|54)\.\d.*/g.test(navigator.userAgent))return null;if(E.k)return null;var e=window.PaymentRequest;return e.prototype.canMakePayment||(e.prototype.canMakePayment=function(){return T.a.resolve(!1)}),e}(),Ht=null,zt=function e(t){var n=this;Object(o.a)(this,e),this._onEvent=function(){},this.setEventHandler=function(e){n._onEvent=e},this.canMakePayment=function(e){var t=e.skipEnrollmentChecks;return function(e,t,n){return null!==Ht?T.a.resolve(Ht):Gt&&e?e.action.checkCanMakePayment({skipEnrollmentChecks:n}).then((function(e){var t=e.available;return Ht=!0===t})):T.a.resolve(!1)}(n._prFrame,(Object(p.c)(n._authentication.apiKey),p.a.test),t)},this.update=function(e){var t=n._prFrame;t&&t.send({action:"stripe-pr-update",payload:{data:e}})},this.show=function(){if(!n._prFrame)throw new v.a("Payment Request is not available in this browser.");n._prFrame.send({action:"stripe-pr-show",payload:{data:{usesButtonElement:n._usesButtonElement()}}})},this.abort=function(){n._prFrame&&n._prFrame.send({action:"stripe-pr-abort",payload:{}})},this._setupPrFrame=function(e,t){e.send({action:"stripe-pr-initialize",payload:{data:t}}),e._on("pr-cancel",(function(){n._onEvent({type:"cancel"})})),e._on("pr-close",(function(){n._onEvent({type:"close"})})),e._on("pr-error",(function(e){n._onEvent({type:"error",payload:{errorMessage:e.message||"",errorCode:e.code||""}})})),e._on("pr-callback",(function(t){var a=t.event,o=t.nonce,i=t.options;switch(a){case"token":n._onEvent({type:"paymentresponse",payload:Object(r.a)(Object(r.a)({},i),{},{complete:function(t){e.send({action:"stripe-pr-callback-complete",payload:{data:{status:t},nonce:o}})}})});break;case"shippingaddresschange":n._onEvent({type:"shippingaddresschange",payload:{shippingAddress:i.shippingAddress,updateWith:function(t){e.send({action:"stripe-pr-callback-complete",payload:{nonce:o,data:t}})}}});break;case"shippingoptionchange":n._onEvent({type:"shippingoptionchange",payload:{shippingOption:i.shippingOption,updateWith:function(t){e.send({action:"stripe-pr-callback-complete",payload:{nonce:o,data:t}})}}});break;default:throw new Error("Unexpected event from PaymentRequest inner: ".concat(a))}}))};var a=t.authentication,i=t.controller,c=t.mids,s=t.origin,u=t.usesButtonElement,d=t.options;if(this._authentication=a,this._controller=i,this._usesButtonElement=u,Gt&&"https:"===window.location.protocol){this._controller.action.fetchLocale({locale:"auto"});var f=this._controller.createHiddenFrame(l.c.PAYMENT_REQUEST_BROWSER,{authentication:a,mids:c,origin:s});this._setupPrFrame(f,d),this._prFrame=f}else this._prFrame=null},Yt=!1,Kt=function(e){Object(b.a)(n,e);var t=Object(y.a)(n);function n(e){var a;Object(o.a)(this,n),(a=t.call(this))._usedByButtonElement=null,a._showCalledByButtonElement=!1,a._isShowing=!1,a._backingLibraries={APPLE_PAY:null,GOOGLE_PAY:null,BROWSER:null},a._activeBackingLibraryName=null,a._buttonTypeName=null,a._activeBackingLibrary=null,a._canMakePaymentAvailability={APPLE_PAY:null,GOOGLE_PAY:null,BROWSER:null},a._canMakePaymentResolved=!1,a._validateUserOn=function(e,t){"string"==typeof e&&("source"===e&&a._hasRegisteredListener("paymentmethod")||"paymentmethod"===e&&a._hasRegisteredListener("source"))&&(a._report("pr.double_callback_registration"),a._controller.warn("Do not register event listeners for both `source` or `paymentmethod`. Only one of them will succeed."))},a._report=function(e,t){a._controller.report(e,Object(r.a)(Object(r.a)({},t),{},{activeBackingLibrary:a._activeBackingLibraryName,usesButtonElement:a._usedByButtonElement||!1}))},a._warn=function(e){a._controller.warn(e)},a._registerElement=function(){a._usedByButtonElement=!0},a._elementShow=function(){a._showCalledByButtonElement=!0,a.show()},a._initBackingLibraries=function(e){a._queryStrategy.forEach((function(t){var n={controller:a._controller,authentication:a._authentication,mids:a._mids,origin:window.location.origin,options:e,usesButtonElement:function(){return!0===a._usedByButtonElement},listenerRegistry:a._listenerRegistry};switch(t){case"APPLE_PAY":a._backingLibraries.APPLE_PAY=new Mt(n),a._backingLibraries.APPLE_PAY.setEventHandler(a._handleInternalEvent);break;case"GOOGLE_PAY":a._backingLibraries.GOOGLE_PAY=new Ut(n),a._backingLibraries.GOOGLE_PAY.setEventHandler(a._handleInternalEvent);break;case"BROWSER":a._backingLibraries.BROWSER=new zt(n),a._backingLibraries.BROWSER.setEventHandler(a._handleInternalEvent);break;default:Object(Re.a)(t)}}))},a._handleInternalEvent=function(e){switch(e.type){case"paymentresponse":a._emitPaymentResponse(e.payload);break;case"error":a._report("error.pr.internal_error",{error:e.payload});break;case"close":a._isShowing=!1;break;default:a._emitExternalEvent(e)}},a._emitExternalEvent=function(e){switch(e.type){case"cancel":a._emit("cancel");break;case"shippingoptionchange":case"shippingaddresschange":var t=e.type,n=e.payload,o=null,i=!1,c=!1,l=function(r){if(c&&i)return a._report("pr.update_with_called_after_timeout",{event:t}),void a._controller.warn("Call to updateWith() was ignored because it has already timed out. Please ensure that updateWith is called within 30 seconds.");if(i)return a._report("pr.update_with_double_call",{event:t}),void a._controller.warn("Call to updateWith() was ignored because it has already been called. Do not call updateWith more than once.");o&&clearTimeout(o),i=!0,a._report("pr.update_with",{event:t});var l=Object(u.E)(Qe,r||{},"".concat(t," callback")),p=l.value;l.warnings.forEach((function(e){return a._controller.warn(e)}));var d=p,f=!1;if(a._initialOptions.__isCheckout&&"APPLE_PAY"===a._activeBackingLibraryName&&p.shippingOptions&&1===p.shippingOptions.length&&0===p.shippingOptions[0].amount){p.shippingOptions;d=Object(s.a)(p,["shippingOptions"]),f=!0}var m=p.shippingOptions||a._initialOptions.shippingOptions;if(!(f||"shippingaddresschange"!==e.type||p.status!==ze.success||m&&m.length))throw new v.a("When requesting shipping information, you must specify shippingOptions once a shipping address is selected.\nEither provide shippingOptions in stripe.paymentRequest(...) or listen for the shippingaddresschange event and provide shippingOptions to the updateWith callback there.");n.updateWith(d)};a._hasRegisteredListener(e.type)?(o=setTimeout((function(){c=!0,a._report("pr.update_with_timed_out",{event:t}),a._controller.warn('Timed out waiting for a call to updateWith(). If you listen to "'.concat(e.type,'" events, then you must call event.updateWith in the "').concat(e.type,'" handler within 30 seconds.')),l({status:"fail"})}),29900),a._emit(t,Object(r.a)(Object(r.a)({},n),{},{updateWith:l}))):l({status:"success"});break;case"token":case"source":case"paymentmethod":var p=e.type,d=e.payload,f=null,m=!1,_=!1,h=function(e){if(m&&_)return a._report("pr.complete_called_after_timeout"),void a._controller.warn("Call to complete() was ignored because it has already timed out. Please ensure that complete is called within 30 seconds.");if(_)return a._report("pr.complete_double_call"),void a._controller.warn("Call to complete() was ignored because it has already been called. Do not call complete more than once.");f&&clearTimeout(f),_=!0;var t=Object(u.E)(et,e,"status for PaymentRequest completion"),n=t.value;t.warnings.forEach((function(e){return a._controller.warn(e)})),d.complete(n)};f=setTimeout((function(){m=!0,a._report("pr.complete_timed_out"),a._controller.warn('Timed out waiting for a call to complete(). Once you have processed the payment in the "'.concat(e.type,'" handler, you must call event.complete within 30 seconds.')),h("fail")}),29900),a._emit(p,Object(r.a)(Object(r.a)({},d),{},{complete:h}));break;default:Object(Re.a)(e)}},a._maybeEmitPaymentResponse=function(e){a._isShowing&&a._emitExternalEvent(e)},a._emitPaymentResponse=function(e){a._report("pr.payment_authorized");var t=e.token,n=Object(s.a)(e,["token"]),o=n.payerEmail,i=n.payerPhone,c=n.complete,u=a._showCalledByButtonElement?l.b.paymentRequestButton:null;a._hasRegisteredListener("token")&&a._maybeEmitPaymentResponse({type:"token",payload:e}),a._hasRegisteredListener("source")&&a._controller.action.createSourceWithData({elementName:u,type:"card",sourceData:{token:t.id,owner:{email:a._initialOptions.__billingDetailsEmailOverride||o,phone:i}},mids:null}).then((function(e){"error"===e.type?e.error.code&&"email_invalid"===e.error.code?c("invalid_payer_email"):(a._report("fatal.pr.token_to_source_failed",{error:e.error,token:t.id}),c("fail")):a._maybeEmitPaymentResponse({type:"source",payload:Object(r.a)(Object(r.a)({},n),{},{source:e.object})})})),a._hasRegisteredListener("paymentmethod")&&a._controller.action.createPaymentMethodWithData({elementName:u,type:"card",paymentMethodData:{card:{token:t.id},billing_details:{email:a._initialOptions.__billingDetailsEmailOverride||o,phone:i}},mids:null}).then((function(e){"error"===e.type?e.error.code&&"email_invalid"===e.error.code?c("invalid_payer_email"):(a._report("fatal.pr.token_to_payment_method_failed",{error:e.error,token:t.id}),c("fail")):a._maybeEmitPaymentResponse({type:"paymentmethod",payload:Object(r.a)(Object(r.a)({},n),{},{paymentMethod:e.object})})}))},a._canMakePaymentForBackingLibrary=function(e,t){var n=a._backingLibraries[e];if(!n)throw new Error("Unexpectedly calling canMakePayment on uninitialized backing library.");return T.a.race([new T.a((function(e){return setTimeout(e,1e4)})).then((function(){return!1})),n.canMakePayment({skipEnrollmentChecks:t}).then((function(e){return!!e}))]).then((function(t){return a._canMakePaymentAvailability=Object(r.a)(Object(r.a)({},a._canMakePaymentAvailability),{},Object(c.a)({},e,t)),{backingLibraryName:e,available:t}}))},a._isGooglePayOnAndroid=function(){var e=a._initialOptions.wallets,t=e&&-1===e.indexOf("googlePay");return E.a&&!t},a._constructCanMakePaymentResponse=function(){var e=a._isGooglePayOnAndroid()&&!!a._canMakePaymentAvailability.BROWSER;return{applePay:!!a._canMakePaymentAvailability.APPLE_PAY,googlePay:!!a._canMakePaymentAvailability.GOOGLE_PAY||e}},a.canMakePayment=Object(x.c)((function(e){var t=Boolean(null==e?void 0:e.skipEnrollmentChecks);if(a._report("pr.can_make_payment"),a._canMakePaymentResolved){var n=null!==a._activeBackingLibrary?a._constructCanMakePaymentResponse():null;return a._report("pr.can_make_payment_response",{response:n,cached:!0}),T.a.resolve(n)}if("https:"!==window.location.protocol)return Yt||(a._controller.warn("If you are testing Apple Pay or Google Pay, you must serve this page over HTTPS as it will not work over HTTP. Please read https://stripe.com/docs/stripe-js/elements/payment-request-button#html-js-prerequisites for more details."),Yt=!0),a._canMakePaymentResolved=!0,T.a.resolve(null);var r=a._queryStrategy.map((function(e){return function(){return a._canMakePaymentForBackingLibrary(e,!!a._initialOptions.__isCheckout&&t)}})),o=new le.a;return Fe(r,(function(e){var t=e.backingLibraryName,n=e.available;return n&&(a._activeBackingLibraryName=t,a._activeBackingLibrary=a._backingLibraries[t],a._buttonTypeName=a._activeBackingLibraryName,a._isGooglePayOnAndroid()&&(a._buttonTypeName="GOOGLE_PAY")),n})).then((function(e){var t=new le.a;a._canMakePaymentResolved=!0;var n=null;return"SATISFIED"===e.type&&(n=a._constructCanMakePaymentResponse()),a._report("pr.can_make_payment_response",{response:n,cached:!1,duration:o.getElapsedTime(t)}),n}))})),a.update=Object(x.c)((function(e){if(a._isShowing)throw a._report("pr.update_called_while_showing"),new v.a("You cannot update Payment Request options while the payment sheet is showing.");var t=Object(u.E)(Xe,e,"PaymentRequest update()"),n=t.value,r=t.warnings;a._report("pr.update"),r.forEach((function(e){return a._warn(e)})),Object(M.j)(a._backingLibraries).forEach((function(e){e&&e.update(n)}))})),a.show=Object(x.c)((function(){if(a._usedByButtonElement&&!a._showCalledByButtonElement&&(a._report("pr.show_called_with_button"),a._warn("Do not call show() yourself if you are using the paymentRequestButton Element. The Element handles showing the payment sheet.")),!a._canMakePaymentResolved)throw a._report("pr.show_called_before_can_make_payment"),new v.a("You must first check the Payment Request API's availability using paymentRequest.canMakePayment() before calling show().");if(!a._activeBackingLibrary)throw a._report("pr.show_called_with_can_make_payment_false"),new v.a("Payment Request is not available in this browser.");var e=a._activeBackingLibrary;a._report("pr.show",{listeners:Object.keys(a._callbacks).sort()}),a._isShowing=!0,e.show()})),a.abort=Object(x.c)((function(){if(a._activeBackingLibrary){var e=a._activeBackingLibrary;a._report("pr.abort"),e.abort()}})),a.isShowing=function(){return a._isShowing},a._controller=e.controller,a._authentication=e.authentication,a._mids=e.mids,a._listenerRegistry=e.listenerRegistry;var i=Object(u.E)(Ze,e.rawOptions||{},"paymentRequest()"),p=i.value,d=i.warnings;if(a._report("pr.options",{options:Object(M.h)(p,["country","currency","jcbEnabled","requestPayerEmail","requestPayerName","requestPayerPhone","requestShipping","disableWallets","wallets"])}),d.forEach((function(e){return a._warn(e)})),p.__billingDetailsEmailOverride&&p.requestPayerEmail)throw new v.a("When providing `__billingDetailsEmailOverride`, `requestPayerEmail` has to be `false` so that the customer is not prompted for their email in the payment sheet.");var f=p.disableWallets,m=f?tt.c.filter((function(e){return-1===f.indexOf(e)})):p.wallets;return a._queryStrategy=m?rt(m):e.queryStrategyOverride||nt(),a._report("pr.query_strategy",{queryStrategy:a._queryStrategy}),a._initialOptions=Object(r.a)(Object(r.a)({},p),{},{__betas:e.betas,wallets:m}),a._initBackingLibraries(a._initialOptions),a}return n}(Ne.a),Wt={base:Object(u.s)(u.p),complete:Object(u.s)(u.p),empty:Object(u.s)(u.p),invalid:Object(u.s)(u.p),paymentRequestButton:Object(u.s)(u.p)},Vt={classes:Object(u.s)(Object(u.u)({base:Object(u.s)(u.x),complete:Object(u.s)(u.x),empty:Object(u.s)(u.x),focus:Object(u.s)(u.x),invalid:Object(u.s)(u.x),webkitAutofill:Object(u.s)(u.x)})),hidePostalCode:Object(u.s)(u.b),hideIcon:Object(u.s)(u.b),showIcon:Object(u.s)(u.b),style:Object(u.s)(Object(u.u)(Wt)),iconStyle:Object(u.s)(Object(u.q)("solid","default")),value:Object(u.s)(Object(u.t)(u.x,u.p)),__privateCvcOptional:Object(u.s)(u.b),__privateValue:Object(u.s)(Object(u.t)(u.x,u.p)),__privateEmitIbanValue:Object(u.s)(u.b),error:Object(u.s)(Object(u.u)({type:u.x,code:Object(u.s)(u.x),decline_code:Object(u.s)(u.x),param:Object(u.s)(u.x)})),locale:Object(u.j)("elements()"),fonts:Object(u.j)("elements()"),placeholder:Object(u.s)(u.x),disabled:Object(u.s)(u.b),placeholderCountry:Object(u.s)(u.x),paymentRequest:Object(u.s)(Object(u.h)(Kt,"stripe.paymentRequest(...)")),supportedCountries:Object(u.s)(Object(u.a)(u.x)),accountHolderType:Object(u.s)(Object(u.q)("individual","company")),issuingCard:Object(u.s)(u.x),toCopy:Object(u.s)(Object(u.q)("number","cvc","expiry","pin"))},Jt=Object(u.u)(Vt),$t=n(14),Zt=n(22),Xt=(qt={},Object(c.a)(qt,$t.a.card,Zt.a.CARD_ELEMENT),Object(c.a)(qt,$t.a.cardNumber,Zt.a.CARD_ELEMENT),Object(c.a)(qt,$t.a.cardExpiry,Zt.a.CARD_ELEMENT),Object(c.a)(qt,$t.a.cardCvc,Zt.a.CARD_ELEMENT),Object(c.a)(qt,$t.a.postalCode,Zt.a.CARD_ELEMENT),Object(c.a)(qt,$t.a.paymentRequestButton,Zt.a.PAYMENT_REQUEST_ELEMENT),Object(c.a)(qt,$t.a.iban,Zt.a.IBAN_ELEMENT),Object(c.a)(qt,$t.a.idealBank,Zt.a.IDEAL_BANK_ELEMENT),Object(c.a)(qt,$t.a.p24Bank,Zt.a.P24_BANK_ELEMENT),Object(c.a)(qt,$t.a.auBankAccount,Zt.a.AU_BANK_ACCOUNT_ELEMENT),Object(c.a)(qt,$t.a.fpxBank,Zt.a.FPX_BANK_ELEMENT),Object(c.a)(qt,$t.a.issuingCardNumberDisplay,Zt.a.ISSUING_CARD_NUMBER_DISPLAY_ELEMENT),Object(c.a)(qt,$t.a.issuingCardCopyButton,Zt.a.ISSUING_CARD_COPY_BUTTON_ELEMENT),Object(c.a)(qt,$t.a.issuingCardCvcDisplay,Zt.a.ISSUING_CARD_CVC_DISPLAY_ELEMENT),Object(c.a)(qt,$t.a.issuingCardExpiryDisplay,Zt.a.ISSUING_CARD_EXPIRY_DISPLAY_ELEMENT),Object(c.a)(qt,$t.a.issuingCardPinDisplay,Zt.a.ISSUING_CARD_PIN_DISPLAY_ELEMENT),Object(c.a)(qt,$t.a.epsBank,Zt.a.EPS_BANK_ELEMENT),Object(c.a)(qt,$t.a.netbankingBank,Zt.a.NETBANKING_BANK_ELEMENT),Object(c.a)(qt,$t.a.afterpayClearpayMessageModal,Zt.a.AFTERPAY_MESSAGE_MODAL_ELEMENT),Object(c.a)(qt,$t.a.autocompleteSuggestions,Zt.a.AUTOCOMPLETE_SUGGESTIONS_ELEMENT),Object(c.a)(qt,$t.a.achBankSearchResults,Zt.a.ACH_BANK_SEARCH_RESULTS_ELEMENT),qt),Qt=function(e){var t=Object(Be.a)(e,null);return!!t&&"rtl"===t.getPropertyValue("direction")},en=n(55),tn=function(e){var t=document.createElement("input");return t.className=e,t.setAttribute("aria-hidden","true"),t.setAttribute("aria-label"," "),t.setAttribute("autocomplete","false"),t.maxLength=1,t.disabled=!0,Object(O.d)(t,en.b),t},nn=["test_id"],rn=function(e){switch(e.type){case"object":return nn.push(e.object.id),{issuingCard:e.object};case"error":return{error:e.error};default:return Object(Re.a)(e)}},an=function(e){switch(e.type){case"object":return{nonce:e.object.public_nonce};case"error":return{error:e.error};default:return Object(Re.a)(e)}},on={base:"StripeElement",focus:"StripeElement--focus",invalid:"StripeElement--invalid",complete:"StripeElement--complete",empty:"StripeElement--empty",webkitAutofill:"StripeElement--webkit-autofill"},cn="#faffbd",sn=function(e){return parseFloat(e.toFixed(1))},un=function(e){return/^\d+(\.\d*)?px$/.test(e)},ln=function(){function e(t){var n=this;Object(o.a)(this,e),this.focus=function(){if(n._isIssuingDisplayElement())throw new v.a("Cannot call focus() on an ".concat(n._componentName," Element."));document.activeElement&&document.activeElement.blur&&document.activeElement.blur(),n._fakeInput.focus()},this._formSubmit=function(){for(var e=n._component.parentElement;e&&"FORM"!==e.nodeName;)e=e.parentElement;if(e){var t=document.createEvent("Event");t.initEvent("submit",!0,!0),e.dispatchEvent(t)}};var r=t.options,a=t.component,i=t.listenerRegistry,c=t.elementTimings,s=t.emitEvent,l=t.getParent,p=Object(M.g)(r,["loader"]),d=p.controller,f=p.componentName,m=p.publicOptions;this._componentName=f,this._component=a,this._controller=d,this._listenerRegistry=i,this._emitEvent=s,this._getParent=l;var _=Object(u.E)(Jt,m||{},"create()"),h=_.value;_.warnings.forEach((function(e){return n._controller.warn(e)}));var b,y=h.paymentRequest,O=h.classes,g=h.issuingCard,j="paymentRequestButton"===this._componentName;if(j){if(!y)throw new v.a("You must pass in a stripe.paymentRequest object in order to use this Element.");this._paymentRequest=y,this._paymentRequest._registerElement()}if(this._isIssuingDisplayElement()){if(!g)throw new Error("You must pass in an ID to the issuingCard option in order to use this Element.");if(b=g,-1===nn.indexOf(b))throw new Error("Issuing card ".concat(g," has not been retrieved."))}this._createElement(p,h,c),this._classes=on,this._computeCustomClasses(O||{}),this._lastBackgroundColor="",this._focused=!1,this._empty=!j,this._invalid=!1,this._complete=!1,this._autofilled=!1,this._lastSubmittedAt=null}return Object(i.a)(e,[{key:"update",value:function(e){var t=this,n=Object(u.E)(Jt,e||{},"element.update()"),r=n.value;if(n.warnings.forEach((function(e){return t._controller.warn(e)})),r){var a=r.classes,o=Object(s.a)(r,["classes"]);a&&(this._removeClasses(),this._computeCustomClasses(a),this._updateClasses()),this._updateFrameHeight(r),Object.keys(o).length&&(this._frame.update(o),this._secondaryFrame&&this._secondaryFrame.update(o))}}},{key:"blur",value:function(){if(this._isIssuingDisplayElement())throw new v.a("Cannot call blur() on an ".concat(this._componentName," Element."));this._frame.blur(),this._fakeInput.blur()}},{key:"clear",value:function(){this._frame.clear()}},{key:"unmount",value:function(){var e=this._getParent(),t=this._label;e&&(this._listenerRegistry.removeEventListener(e,"click",this.focus),this._removeClasses()),t&&(this._listenerRegistry.removeEventListener(t,"click",this.focus),this._label=null),this._secondaryFrame&&(this._secondaryFrame.unmount(),this._listenerRegistry.removeEventListener(window,"click",this._handleOutsideClick)),this._fakeInput.disabled=!0,this._frame.unmount()}},{key:"mount",value:function(){if(Object(O.b)(document,this._component)){this._controller.report("user_error.shadow_dom_mount",{element:this._componentName});var e=function(){throw new v.a("Elements cannot be mounted in a ShadowRoot. Please mount in the Light DOM.")};"test"===this._controller.keyMode()?e():setTimeout(e,0)}if(this._paymentRequest){if(!this._paymentRequest._canMakePaymentResolved)throw new v.a("For the paymentRequestButton Element, you must first check availability using paymentRequest.canMakePayment() before mounting the Element.");if(!this._paymentRequest._activeBackingLibraryName)throw new v.a("The paymentRequestButton Element is not available in the current environment.")}this._mountTimestamp=new le.a,this._findPossibleLabel(),this._updateClasses()}},{key:"_isIssuingDisplayElement",value:function(){return"issuingCardNumberDisplay"===this._componentName||"issuingCardCvcDisplay"===this._componentName||"issuingCardExpiryDisplay"===this._componentName||"issuingCardPinDisplay"===this._componentName}},{key:"_updateClasses",value:function(){var e=this._getParent();e&&Object(O.f)(e,[[this._classes.base,!0],[this._classes.empty,this._empty],[this._classes.focus,this._focused],[this._classes.invalid,this._invalid],[this._classes.complete,this._complete],[this._classes.webkitAutofill,this._autofilled]])}},{key:"_removeClasses",value:function(){var e=this._getParent();e&&Object(O.f)(e,[[this._classes.base,!1],[this._classes.empty,!1],[this._classes.focus,!1],[this._classes.invalid,!1],[this._classes.complete,!1],[this._classes.webkitAutofill,!1]])}},{key:"_findPossibleLabel",value:function(){var e=this._getParent();if(e){var t,n=e.getAttribute("id");if(n&&(t=document.querySelector("label[for='".concat(n,"']"))),t)this._listenerRegistry.addEventListener(e,"click",this.focus);else for(t=t||e.parentElement;t&&"LABEL"!==t.nodeName;)t=t.parentElement;t?(this._label=t,this._listenerRegistry.addEventListener(t,"click",this.focus)):this._listenerRegistry.addEventListener(e,"click",this.focus)}}},{key:"_computeCustomClasses",value:function(e){var t={};return Object.keys(e).forEach((function(n){if(!on[n])throw new v.a("".concat(n," is not a customizable class name.\nYou can customize: ").concat(Object.keys(on).join(", ")));var r=e[n]||on[n];t[n]=r.replace(/\./g," ")})),this._classes=Object(r.a)(Object(r.a)({},this._classes),t),this}},{key:"_setupEvents",value:function(e){var t=this,n=e.stripeJsLoadTimestamp,r=(e.stripeCreateTimestamp,e.groupCreateTimestamp),o=e.createTimestamp,i=0,c=0,s={stripeJsLoad:n.getAsPosixTime(),stripeCreate:o.getAsPosixTime(),groupCreate:r.getAsPosixTime(),create:o.getAsPosixTime()};if(this._frame._on("load",(function(e){var n=e.source;i++;var r=t._getParent(),a=Qt(r),o=t._paymentRequest?t._paymentRequest._buttonTypeName:null;t._mountTimestamp&&(s.mount=t._mountTimestamp.getAsPosixTime()),t._frame.send({action:"stripe-user-mount",payload:{timestamps:s,loadCount:i,matchFrame:n===t._frame._iframe.contentWindow,rtl:a,paymentRequestButtonType:o}})})),this._secondaryFrame){var u=this._secondaryFrame;u._on("load",(function(e){var n=e.source;c++,t._mountTimestamp&&(s.mount=t._mountTimestamp.getAsPosixTime()),u.send({action:"stripe-user-mount",payload:{timestamps:s,loadCount:c,matchFrame:n===u._iframe.contentWindow,rtl:!1,paymentRequestButtonType:null}})}))}this._frame._on("redirectfocus",(function(e){var n=e.focusDirection,r=Object(xe.b)(t._component,n);r&&r.focus()})),this._frame._on("focus",(function(){t._focused=!0,t._updateClasses()})),this._frame._on("blur",(function(){t._focused=!1,t._updateClasses(),t._lastSubmittedAt&&"paymentRequestButton"===t._componentName&&(t._controller.report("payment_request_button.sheet_visible",{latency:t._lastSubmittedAt.getElapsedTime()}),t._lastSubmittedAt=null)})),this._frame._on("submit",(function(){if("paymentRequestButton"===t._componentName){t._lastSubmittedAt=new le.a;var e=!1,n=!1;ue(),t._emitEvent("click",{preventDefault:function(){t._controller.report("payment_request_button.default_prevented"),e&&t._controller.warn("event.preventDefault() was called after the payment sheet was shown. Make sure to call it synchronously when handling the `click` event."),n=!0}}),!n&&t._paymentRequest&&(t._paymentRequest._elementShow(),e=!0)}else t._emitEvent("submit"),t._formSubmit()})),["ready","focus","blur","escape","click"].forEach((function(e){t._frame._on(e,(function(){t._emitEvent(e)}))})),this._frame._on("change",(function(e){ue();var n={},r=Ie.a[t._componentName]||[];["error","value","empty","complete"].concat(Object(a.a)(r)).forEach((function(t){return n[t]=e[t]})),t._emitEvent("change",n),t._empty=n.empty,t._invalid=!!n.error,t._complete=n.complete,t._updateClasses()})),this._frame._on("__privateIntegrationError",(function(e){var n=e.message;t._emitEvent("__privateIntegrationError",{message:n})})),this._frame._on("dimensions",(function(e){var n=t._getParent();if(n){var r=Object(Be.a)(n,null);if(r){var a=parseFloat(r.getPropertyValue("height")),o=e.height;if("border-box"===r.getPropertyValue("box-sizing")){var i=parseFloat(r.getPropertyValue("padding-top")),c=parseFloat(r.getPropertyValue("padding-bottom"));a=a-parseFloat(r.getPropertyValue("border-top"))-parseFloat(r.getPropertyValue("border-bottom"))-i-c}var s=sn(a),u=sn(o);0!==a&&s1&&void 0!==arguments[1]&&arguments[1],n=e.style;if("paymentRequestButton"===this._componentName){var r=n&&n.paymentRequestButton||{},a=r.height,o="string"==typeof a?a:void 0;(t||o)&&(this._frame.updateStyle({height:o||this._lastHeight||Ue}),this._lastHeight=o||this._lastHeight)}else{var i=n&&n.base||{},c=i.lineHeight,s=i.fontSize,u=i.padding,p="string"!=typeof c||isNaN(parseFloat(c))?void 0:c,d="string"==typeof s?s:void 0,f="string"==typeof u?u:void 0;if(d&&!un(d)&&this._controller.warn("The fontSize style you specified (".concat(d,") is not in px. We do not recommend using relative css units, as they will be calculated relative to our iframe's styles rather than your site's.")),t||p||d){var m=-1===l.l.indexOf(this._componentName)?void 0:f||this._lastPadding,_=qe(p||this._lastHeight,d||this._lastFontSize,m);this._frame.updateStyle({height:_}),this._lastFontSize=d||this._lastFontSize,this._lastHeight=p||this._lastHeight,this._lastPadding=m}}}},{key:"_createElement",value:function(e,t,n){var a=this,o=(e.controller,e.publicOptions,e.componentName),i=e.groupId,c=Object(s.a)(e,["controller","publicOptions","componentName","groupId"]),u=(t.classes,t.paymentRequest,Object(s.a)(t,["classes","paymentRequest"])),p=this._component,d=tn(fe.c);Object(O.d)(p,en.a);var f=Qt(document.body),m=Xt[o],_=Object(r.a)(Object(r.a)(Object(r.a)({},c),u),{},{rtl:f}),h=this._controller.createElementFrame(m,o,i,_);if(h._on("load",(function(){d.disabled=!1})),this._listenerRegistry.addEventListener(d,"focus",(function(){h.focus()})),h.appendTo(p),Ie.c[o]){var b=Ie.c[o].secondary,y=this._controller.createSecondaryElementFrame(m,b,o,i,_);y&&y.on&&y.on("height-change",(function(e){y.updateStyle({height:"".concat(e.height,"px")})})),this._secondaryFrame=y,y.appendTo(p),this._listenerRegistry.addEventListener(window,"click",(function(){return a._handleOutsideClick()}))}if(p.appendChild(d),E.h&&o!==l.b.paymentRequestButton){var v=function(){var e=tn(fe.d);return e.setAttribute("tabindex","-1"),e}();p.appendChild(v)}this._frame=h,this._fakeInput=d,this._setupEvents(n),this._updateFrameHeight(t,!0)}}]),e}(),pn=n(19),dn={amount:u.n,currency:Object(u.q)("USD"),logoColor:Object(u.s)(Object(u.q)("primary","black","white")),fontColor:Object(u.s)(u.x),fontSize:Object(u.s)(u.x),textAlign:Object(u.s)(u.x),stripeMerchantId:Object(u.s)(u.x)},fn=Object(u.u)(dn),mn=function(e){var t=!1;window.Promise||(t=!0,window.Promise=T.a);var n=e();return t&&window.Promise===T.a&&delete window.Promise,n},_n=function(e){var t,o=e.options,i=Object(s.a)(e,["options"]),c=e.emitEvent,l=e.listenerRegistry,p=o.controller,d=o.componentName,f=o.publicOptions,m=o.groupId,_=new le.a,h=function(e){var t=Object(u.E)(fn,e||{},"create()"),n=t.value,r=t.warnings;if(!Math.floor(n.amount)===n.amount)throw new v.a("'Amount' must be a whole integer number that represents the lowest denomination (cents).");return r.forEach((function(e){return p.warn(e)})),n},b=h(f),y=function(e,n){return e.apply(void 0,[t].concat(Object(a.a)(n)))},O=[],g=function(e){return function(){for(var n=arguments.length,r=new Array(n),a=0;a0&&void 0!==arguments[0]?arguments[0]:{};return Object(M.h)(e,["business","fields","paymentMethodOrder","readOnly","terms","wallets","accountHolderType","disabled","hideIcon","hidePostalCode","iconStyle","placeholderCountry","rtl","showIcon","supportedCountries","betas","componentName","groupId","locale","loader"])},Yn=function(e){Object(b.a)(n,e);var t=Object(y.a)(n);function n(e,a,i){var c;Object(o.a)(this,n),(c=t.call(this)).mount=Object(x.c)((function(e){var t;if(c._checkDestroyed(),!e)throw new v.a("Missing argument. Make sure to call mount() with a valid DOM element or selector.");if("string"==typeof e){var n=document.querySelectorAll(e);if(n.length>1&&c._controller.warn("The selector you specified (".concat(e,") applies to ").concat(n.length," DOM elements that are currently on the page.\nThe Stripe Element will be mounted to the first one.")),!n.length)throw new v.a("The selector you specified (".concat(e,") applies to no DOM elements that are currently on the page.\nMake sure the element exists on the page before calling mount()."));t=n[0]}else{if(!e.appendChild)throw new v.a("Invalid DOM element. Make sure to call mount() with a valid DOM element or selector.");t=e}if("INPUT"===t.nodeName)throw new v.a("Stripe Elements must be mounted in a DOM element that\ncan contain child nodes. `input` elements are not permitted to have child\nnodes. Try using a `div` element instead.");t.children.length&&c._controller.warn("This Element will be mounted to a DOM element that contains child nodes."),c._mountToParent(t)})),c.update=Object(x.c)((function(e){return c._controller.report("update",{options:zn(e),element:c._componentName}),c._checkDestroyed(),c._implementation.update(e),Object(m.a)(c)})),c.focus=Object(x.c)((function(e){return c._checkDestroyed(),e&&e.preventDefault(),c._implementation.focus(),Object(m.a)(c)})),c.blur=Object(x.c)((function(){return c._checkDestroyed(),c._implementation.blur(),Object(m.a)(c)})),c.clear=Object(x.c)((function(){return c._checkDestroyed(),c._implementation.clear(),Object(m.a)(c)})),c.collapse=Object(x.c)((function(){if(c._checkDestroyed(),!c._implementation.collapse)throw new v.a("Collapse is not supported by the ".concat(c._componentName," Element."));return c._implementation.collapse(),Object(m.a)(c)})),c.unmount=Object(x.c)((function(){return c._checkDestroyed(),c._unmount(),Object(m.a)(c)})),c.destroy=Object(x.c)((function(){return c._checkDestroyed(),c.unmount(),c._destroyed=!0,c._emitEvent("destroy"),Object(m.a)(c)})),c._getParent=function(){return c._parent},c._emitEvent=function(e,t){return"loaderror"!==e||c._hasRegisteredListener("loaderror")||c._controller.keyMode()!==p.a.test||console.error("Unhandled ".concat(c._componentName," Element loaderror"),t),c._emit(e,Object(r.a)({elementType:c._componentName},t))};var s=e.controller,u=e.componentName,l=e.groupId,d=e.locale,f=e.betas,_=e.mids;c._controller=s,c._componentName=u,c._destroyed=!1,c._mids=_;var h=document.createElement("div");return h.className=Ie.d,c._component=h,s.report("create",{options:zn(Object(r.a)({componentName:u,groupId:l,locale:d,betas:f},e.publicOptions)),element:u}),c._implementation=Hn(c._componentName,{options:e,component:h,listenerRegistry:a,elementTimings:i,emitEvent:c._emitEvent,getParent:c._getParent,selfDestruct:function(){c.destroy()}}),c}return Object(i.a)(n,[{key:"_checkDestroyed",value:function(){if(this._destroyed)throw new v.a("This Element has already been destroyed. Please create a new one.")}},{key:"_isMounted",value:function(){return!!document.body&&document.body.contains(this._component)}},{key:"_unmount",value:function(){var e=this._component.parentElement;e&&e.removeChild(this._component),this._implementation.unmount(),this._parent=null}},{key:"_mountToParent",value:function(e){var t=this._component.parentElement,n=this._isMounted();if(e===t){if(n)return;this.unmount(),this._mountTo(e)}else if(t){if(n)throw new v.a("This Element is already mounted. Use `unmount()` to unmount the Element before re-mounting.");this.unmount(),this._mountTo(e)}else this._mountTo(e)}},{key:"_mountTo",value:function(e){for(this._parent=e;e.firstChild;)e.removeChild(e.firstChild);e.appendChild(this._component),this._controller.report("mount",{element:this._componentName}),this._implementation.mount()}}]),n}(Ne.a),Kn=function(e,t){e._controller.report("legacy_private_property_used",{prop:t,componentName:e._componentName})};["_autofilled","_classes","_complete","_empty","_fakeInput","_focused","_frame","_invalid","_lastBackgroundColor","_lastFontSize","_lastHeight","_lastPadding","_lastSubmittedAt","_listenerRegistry","_paymentRequest"].forEach((function(e){Object.defineProperty(Yn.prototype,e,{enumerable:!1,get:function(){return Kn(this,e),this._implementation[e]}})}));["_formSubmit","_isIssuingDisplayElement"].forEach((function(e){Object.defineProperty(Yn.prototype,e,{enumerable:!1,writable:!1,value:function(){return Kn(this,e),this._implementation[e]()}})}));var Wn=Yn,Vn=n(75),Jn=n(9),$n=function(e,t){if("string"!=typeof e)return Object(u.i)("a client_secret string",e,t);var n=Object(Jn.d)(e)||Object(Vn.a)(e);return null===n?Object(u.i)("a client secret of the form ${id}_secret_${secret}",e,t):Object(u.D)(n,[])},Zn=Object(u.u)({locale:Object(u.s)(u.x),appearance:Object(u.s)(u.p)}),Xn=function e(t,n,i,c,l,p){var f=this;Object(o.a)(this,e),this.getElement=Object(x.c)((function(e){var t,n=(null!=(t=e)&&t.__elementType&&"string"==typeof t.__elementType&&"function"==typeof t?t.__elementType:null)||e;return Ce(n,f._betas),Object(M.a)(f._elements,(function(e){return e._componentName===n}))||null})),this.update=Object(x.c)((function(e){var t=Object(u.E)(Zn,e||{},"elements.update()"),n=t.value;t.warnings.forEach((function(e){return f._controller.warn(e)}));var r=n.locale,a=n.appearance,o=void 0===a?void 0:a,i=Te(r,f._betas);i&&f._controller.action.fetchLocale({locale:i}),(o||i)&&f._controller.action.updateElementsOptions({locale:i,appearance:o,groupId:f._id})})),this.create=Object(x.e)((function(e,t){var n=new le.a;!function(e,t,n){if(Ce(e,n),Ie.b[e].unique&&-1!==t.indexOf(e))throw new v.a("Can only create one Element of type ".concat(e,"."));var r=Ie.b[e].conflict,a=Object(M.i)(t,r);if(a.length){var o=a[0];throw new v.a("Cannot create an Element of type ".concat(e," after an Element of type ").concat(o," has already been created."))}}(e,f._elements.map((function(e){return e._componentName})),f._betas);var o=Object(r.a)(Object(r.a)(Object(r.a)({},t),f._commonOptions),{},{componentName:e,groupId:f._id}),i=(o.paymentRequest,Object(s.a)(o,["paymentRequest"])),c=(E.e||E.g)&&Object(ge.a)(i).length>2e3,u=!!f._pendingFonts||c,l=new Wn(Object(r.a)(Object(r.a)({publicOptions:t},f._commonOptions),{},{componentName:e,groupId:f._id,fonts:c?null:f._commonOptions.fonts,controller:f._controller,wait:u,mids:f._mids}),f._listenerRegistry,Object(r.a)(Object(r.a)({},f._timings),{},{createTimestamp:n}));return f._elements=[].concat(Object(a.a)(f._elements),[l]),l._on("destroy",(function(){f._elements=f._elements.filter((function(t){return t._componentName!==e}))})),c&&l._implementation.update({fonts:f._commonOptions.fonts}),l}));var m=new le.a,_=Object(u.E)(function(e){var t={locale:Object(u.s)(u.x),fonts:Object(u.s)(Object(u.a)(u.p)),appearance:Object(u.s)(u.p),clientSecret:Object(u.s)($n),loader:Object(u.s)(Object(u.q)("auto","always","never"))};return Object(je.d)(e,je.a.elements_customers_beta_1)?Object(u.u)(Object(r.a)(Object(r.a)({},t),{},{customerOptions:Object(u.s)(Object(u.u)({customer:u.x,ephemeralKey:u.x}))})):Object(u.u)(t)}(c),p||{},"elements()"),h=_.value;_.warnings.forEach((function(e){return t.warn(e)})),Object(ve.c)(t.warn),t.report("elements",{options:h}),h.loader||(Object(je.d)(c,je.a.link_beta_3)?h.loader="auto":h.loader="never");var b=h.fonts,y=void 0===b?[]:b,O=h.locale,g=h.customerOptions,j=void 0===g?null:g,w=Object(s.a)(h,["fonts","locale","customerOptions"]),S=h.appearance?h.appearance:{};this._elements=[],this._id=Object(d.a)("elements"),this._timings=Object(r.a)(Object(r.a)({},i),{},{groupCreateTimestamp:m}),this._controller=t,this._betas=c,this._listenerRegistry=n,this._mids=l;var k=Te(O,c);this._controller.action.fetchLocale({locale:k||"auto"});var A=y.filter((function(e){return!e.cssSrc||"string"!=typeof e.cssSrc})).map((function(e){return Object(r.a)(Object(r.a)({},e),{},{__resolveFontRelativeTo:window.location.href})})),P=y.map((function(e){return e.cssSrc})).reduce((function(e,t){return"string"==typeof t?[].concat(Object(a.a)(e),[t]):e}),[]).map((function(e){return Object(Oe.b)(e)?e:Object(Oe.c)(window.location.href,e)}));return this._pendingFonts=P.length,w.clientSecret&&t.action.setupStoreForElementsGroup({clientSecret:w.clientSecret,customerOptions:j,locale:O,appearance:S,groupId:this._id}),this._commonOptions=Object(r.a)(Object(r.a)({},w),{},{betas:c,appearance:S,locale:k,fonts:A}),P.forEach((function(e){if("string"==typeof e){var t=new le.a;Pe(e).then((function(n){f._controller.report("font.loaded",{load_time:t.getElapsedTime(),font_count:n.length,css_src:e});var o=n.map((function(t){return Object(r.a)(Object(r.a)({},t),{},{__resolveFontRelativeTo:e})}));f._controller.action.updateCSSFonts({fonts:o,groupId:f._id}),f._commonOptions=Object(r.a)(Object(r.a)({},f._commonOptions),{},{fonts:[].concat(Object(a.a)(f._commonOptions.fonts?f._commonOptions.fonts:[]),Object(a.a)(o))})})).catch((function(n){f._controller.report("error.font.not_loaded",{load_time:t.getElapsedTime(),message:n&&n.message&&n.message,css_src:e}),f._controller.warn("Failed to load CSS file at ".concat(e,"."))}))}})),this},Qn=function(e,t,n,r,a,o,i){return new Kt({controller:e,authentication:t,mids:n,rawOptions:r,betas:a,queryStrategyOverride:o,listenerRegistry:i})},er=Object(u.u)({name:Object(u.q)("react-stripe-js","stripe-js","react-stripe-elements"),version:Object(u.m)(u.x),startTime:Object(u.s)(u.n)}),tr=Object(u.d)({name:Object(u.v)(1,30),partner_id:Object(u.s)(Object(u.w)("pp_partner_")),version:Object(u.s)(Object(u.v)(5,15)),url:Object(u.s)(Object(u.v)(4,60))}),nr="publishable",rr="secret",ar="ephemeral",or="restricted",ir="unknown",cr=function(e){if(""===e)throw new v.a("Please call Stripe() with your publishable key. You used an empty string.");switch(function(e){switch(e.split("_",1)[0]){case"pk":return nr;case"sk":return rr;case"ek":return ar;case"rk":return or;default:return ir}}(e)){case rr:throw new v.a("You should not use your secret key with Stripe.js.\n Please pass a publishable key instead.");case ar:throw new v.a("You should not use an ephemeral key with Stripe.js.\n Please pass a publishable key instead.");case or:throw new v.a("You should not use a restricted key with Stripe.js.\n Please pass a publishable key instead.")}},sr=n(8),ur=["elements","createToken","createPaymentMethod"],lr=["elements","createSource","createToken","createPaymentMethod"],pr=function(){function e(t){var n=this;Object(o.a)(this,e),this._gets=[],this._didDetect=!1,this._onDetection=function(e){n._didDetect=!0,t(e)},window.Stripe&&window.Stripe.__cachedInstances&&this._onDetection("react-stripe-elements")}return Object(i.a)(e,[{key:"got",value:function(e){this._didDetect||("elements"===e?this._gets=["elements"]:this._gets.push(e),this._checkForWrapper())}},{key:"called",value:function(e){this._didDetect||(this._gets=this._gets.filter((function(t){return t!==e})))}},{key:"_checkForWrapper",value:function(){Object(M.c)(this._gets,ur)?this._onDetection("react-stripe-js"):Object(M.c)(this._gets,lr)&&this._onDetection("react-stripe-elements")}}]),e}(),dr=function(e){if(!e||"object"!=typeof e)return null;var t=e.type;return{type:"string"==typeof t?t:null,data:Object(s.a)(e,["type"])}},fr=function(e){switch(e.type){case"object":return{source:e.object};case"error":return{error:e.error};default:return Object(Re.a)(e)}},mr={source:Object(u.u)({id:Object(u.w)("src_"),client_secret:Object(u.w)("src_client_secret_")})},_r=Object(u.u)(mr),hr=function(e){switch(e.type){case"object":return{paymentMethod:e.object};case"error":return{error:e.error};default:return Object(Re.a)(e)}},br=n(31),yr=function(e,t,n,r,a){if("string"==typeof n)return function(e,t,n,r,a){var o=Object(br.a)(r),i=dr(o?a:r),c=i||{type:null,data:{}},s=c.type,u=c.data;if(s&&n!==s)return T.a.reject(new v.a("The type supplied in payment_method_data is not consistent."));if(o){var l=o._implementation._frame.id,p=o._componentName;return e.action.createPaymentMethodWithElement({frameId:l,elementName:p,type:n,paymentMethodData:u,mids:t}).then(hr)}return i?e.action.createPaymentMethodWithData({elementName:null,type:n,paymentMethodData:u,mids:t}).then(hr):T.a.reject(new v.a("Please provide either an Element or PaymentMethod creation parameters to createPaymentMethod."))}(e,t,n,r,a);try{var o=(d=n,Object(u.E)(Object(On.e)(null),d,"createPaymentMethod").value),i=o.element,c=o.type,s=o.data;if(i){var l=i._implementation._frame.id,p=i._componentName;return e.action.createPaymentMethodWithElement({frameId:l,elementName:p,type:c,paymentMethodData:s,mids:t}).then(hr)}return e.action.createPaymentMethodWithData({elementName:null,type:c,paymentMethodData:s,mids:t}).then(hr)}catch(e){return T.a.reject(e)}var d},vr=n(33),Or=n(38),gr=n(62),jr=function(e,t){return function(n,a,o,i,c){var s=Object(xn.i)(o,e),u=Object(xn.h)(t,e,i,s),l=Object(xn.g)(e,c),p="none"===u.mode.tag,d=n.action.confirmPaymentIntent(Object(r.a)(Object(r.a)({},u),{},{expectedType:t,options:l,mids:a}));return l.handleActions?d.then(Object(Or.b)(n,t,p,!1,u.otherParams.expand)):d.then(Jn.g)}},Er=jr("confirmAcssDebitPayment",sr.b.acss_debit),wr=jr("confirmAffirmPayment",sr.b.affirm),Sr=jr("confirmAfterpayClearpayPayment",sr.b.afterpay_clearpay),kr=jr("confirmAuBecsDebitPayment",sr.b.au_becs_debit),Ar=jr("confirmBacsDebitPayment",sr.b.bacs_debit),Pr=jr("confirmBancontactPayment",sr.b.bancontact),Tr=jr("confirmBoletoPayment",sr.b.boleto),Ir=jr("confirmCardPayment",sr.b.card),Cr=jr("confirmEpsPayment",sr.b.eps),Nr=jr("confirmFpxPayment",sr.b.fpx),Rr=jr("confirmGiropayPayment",sr.b.giropay),xr=jr("confirmGrabPayPayment",sr.b.grabpay),Mr=jr("confirmIdealPayment",sr.b.ideal),Lr=jr("confirmKlarnaPayment",sr.b.klarna),Dr=jr("confirmKonbiniPayment",sr.b.konbini),qr=jr("confirmOxxoPayment",sr.b.oxxo),Br=jr("confirmAlipayPayment",sr.b.alipay),Fr=jr("confirmP24Payment",sr.b.p24),Ur=jr("confirmPayPalPayment",sr.b.paypal),Gr=jr("confirmSepaDebitPayment",sr.b.sepa_debit),Hr=jr("confirmSofortPayment",sr.b.sofort),zr=jr("confirmIdBankTransferPayment",sr.b.id_bank_transfer),Yr=jr("confirmUpiPayment",sr.b.upi),Kr=jr("confirmUsBankAccountPayment",sr.b.us_bank_account),Wr=jr("confirmNzBankAccountPayment",sr.b.nz_bank_account),Vr=jr("confirmBlikPayment",sr.b.blik),Jr=function(e,t,n,r,a){if(!a||!1!==a.handleActions)throw new v.a("Expected option `handleActions` to be `false`.");return jr("confirmCustomerBalancePayment",sr.b.customer_balance)(e,t,n,r,a)},$r=function(e,t,n,a,o){if(o&&!0===o.handleActions)throw new v.a("Expected option `handleActions` to be `false`.");var i=Object(r.a)(Object(r.a)({},a),{},{payment_method:Object(r.a)({},a&&a.payment_method||{}),payment_method_options:Object(r.a)(Object(r.a)({},a&&a.payment_method_options||{}),{},{wechat_pay:Object(r.a)(Object(r.a)({},a&&a.payment_method_options&&a.payment_method_options.wechat_pay||{}),{},{client:"web"})})});return jr("confirmWechatPayPayment",sr.b.wechat_pay)(e,t,n,i,o)},Zr=function(e,t,n,a,o){if(!a||!a.payment_method_options||!a.payment_method_options.wechat_pay||"web"!==a.payment_method_options.wechat_pay.client&&"mobile_web"!==a.payment_method_options.wechat_pay.client)throw new v.a("Expected client value `web` or `mobile_web` in payment_method_options.");var i={};"string"==typeof a.payment_method&&(i=a.payment_method),"object"==typeof a.payment_method&&(i=Object(r.a)({},a.payment_method||{}));var c=Object(r.a)(Object(r.a)({},a),{},{payment_method:i,payment_method_options:Object(r.a)(Object(r.a)({},a&&a.payment_method_options||{}),{},{wechat_pay:Object(r.a)({},a&&a.payment_method_options&&a.payment_method_options.wechat_pay||{})})});return jr("confirmWechatPayPayment",sr.b.wechat_pay)(e,t,n,c,o)},Xr=Zr,Qr=jr("confirmPayNowPayment",sr.b.paynow),ea=jr("confirmPixPayment",sr.b.pix),ta=jr("confirmPromptPayPayment",sr.b.promptpay),na=jr("confirmNetbankingPayment",sr.b.netbanking),ra=function(e,t,n,a){var o=Object(xn.i)(n,"updatePaymentIntent"),i=Object(xn.f)(a),c=Object(xn.h)(i,"updatePaymentIntent",a,o);return e.action.updatePaymentIntent(Object(r.a)(Object(r.a)({},c),{},{expectedType:i,mids:t,options:null})).then(Jn.g)},aa=function(e,t,n){var r=Object(xn.i)(t,"verifyMicrodepositsForPayment"),a=Object(u.E)(u.p,n,"stripe.verifyMicrodepositsForPayment");return e.action.verifyMicrodepositsForPayment({intentSecret:r,data:a.value}).then(Jn.g)},oa=function(e,t,n){var r=Object(xn.i)(t,"collectUsBankAccountForPayment"),a=Object(u.E)(Object(On.b)("us_bank_account"),n,"stripe.collectUsBankAccountForPayment").value,o=a.paymentMethodData,i=a.otherParams;return Object(Nn.e)(r.clientSecret,r.id,e,o).then((function(t){return t.error?e.action.localizeError(xn.b).then((function(e){return T.a.resolve({error:e})})):t.linkAccountSession.paymentAccount?e.action.attachLinkAccountSessionForPayment({intentSecret:r,linkAccountSessionId:t.linkAccountSession.id,expandParam:i.expand}).then((function(e){return Object(Jn.g)(e)})):e.action.retrievePaymentIntent({intentSecret:r,hosted:!1}).then(Jn.g)}))},ia=function(e,t){var n=Object(u.E)(Object(On.a)(On.h),t,"stripe.collectBankAccountForPayment").value,r=n.clientSecret,a=n.paymentMethodData,o=n.otherParams;return Object(Nn.e)(r.clientSecret,r.id,e,a).then((function(t){return t.error?e.action.localizeError(xn.b).then((function(e){return T.a.resolve({error:e})})):t.linkAccountSession.paymentAccount?e.action.attachLinkAccountSessionForPayment({intentSecret:r,linkAccountSessionId:t.linkAccountSession.id,expandParam:o.expand}).then((function(e){return Object(Jn.g)(e)})):e.action.retrievePaymentIntent({intentSecret:r,hosted:!1}).then(Jn.g)}))},ca=function(e,t){var n=Object(xn.i)(e,"handleCardAction");return t.action.retrievePaymentIntent({intentSecret:n,hosted:!1}).then((function(e){var n=Object(Or.a)(e);switch(n.type){case"error":return T.a.resolve(Object(Jn.g)(e));case"object":var r=n.object;if(Object(Jn.f)(r.status)){if("manual"!==r.confirmation_method)throw new v.a("handleCardAction: The PaymentIntent supplied does not require manual server-side confirmation. Please use confirmCardPayment instead to complete the payment.");return Object(Or.c)(t,r,sr.b.card,n.locale,!1)}throw new v.a("handleCardAction: The PaymentIntent supplied is not in the requires_action state.");default:return Object(Re.a)(n)}}))},sa=n(25),ua=n(43),la=xn.k,pa=function(e){var t=e.mode;return!("paymentMethod-from-data"===t.tag&&t.data.acss_debit)},da=function(e){return null!==e&&"object"==typeof e&&!0===e.skipMandate},fa=function(e){return null!==e&&"object"==typeof e&&!!e.shouldCreatePaymentMethod},ma=function(e){var t=e.controller,n=e.shouldCreatePaymentMethod,r=e.intentSecret,a=e.mode,o=e.confirmIntentData;return t.action.createAcssDebitSession({intentSecret:r,shouldCreatePaymentMethod:n,confirmIntentData:o,mode:a}).then((function(e){if("error"===e.type)return{type:"error",error:e.error};var n=Object(sa.b)(t,{url:Object(ua.a)(e.object.url),size:"400x600",locale:e.locale,frameTitle:"acss.dialog_frame_title",useLightboxHostedCloseButton:!1});return new T.a((function(e){n._on("request-close",(function(){Object(sa.a)(n).then((function(){return t.action.localizeError(xn.a)})).then((function(t){e({type:"error",error:t})}))})),n._on("session-complete",(function(t){var r=t.paymentMethod;Object(sa.a)(n).then((function(){e({type:"success",paymentMethod:r})}))}))}))}))},_a=function(e,t,n,a,o){var i="confirmAcssDebitPayment",c=sr.b.acss_debit,s=Object(xn.i)(n,i),u=Object(xn.h)(c,i,a,s),l=fa(o);return la(o,i),da(o)||!pa(u)?e.action.confirmPaymentIntent(Object(r.a)(Object(r.a)({},u),{},{expectedType:c,options:{handleActions:!1},mids:t})).then(Jn.g):ma({controller:e,shouldCreatePaymentMethod:l,intentSecret:s,mode:"payment",confirmIntentData:u}).then((function(n){switch(n.type){case"error":return{error:n.error};case"success":return e.action.confirmPaymentIntent({mode:{tag:"paymentMethod",paymentMethod:n.paymentMethod,options:u.mode.options||{},intentSecret:s},otherParams:u.otherParams,expectedType:c,options:{handleActions:!1},mids:t}).then(Jn.g);default:return Object(Re.a)(n.type)}}))},ha=function(e,t,n,a,o){var i="confirmAcssDebitSetup",c=sr.b.acss_debit,s=Object(xn.j)(n,i),u=Object(xn.h)(c,i,a,s),l=fa(o);return la(o,i),da(o)||!pa(u)?e.action.confirmSetupIntent(Object(r.a)(Object(r.a)({},u),{},{expectedType:c,options:{handleActions:!1},mids:t})).then(Jn.h):ma({controller:e,shouldCreatePaymentMethod:l,intentSecret:s,mode:"setup",confirmIntentData:u}).then((function(n){switch(n.type){case"error":return{error:n.error};case"success":return e.action.confirmSetupIntent({mode:{tag:"paymentMethod",paymentMethod:n.paymentMethod,options:u.mode.options||{},intentSecret:s},otherParams:u.otherParams,expectedType:c,options:{handleActions:!1},mids:t}).then(Jn.h);default:return Object(Re.a)(n.type)}}))},ba={type:"validation_error",code:"errors.code.unexpected"},ya={type:"validation_error",code:"errors.code.incomplete_payment_details"},va=function(e,t,n,a,o){var i="confirmInstantDebitsPilotPayment",c=Object(xn.i)(n,i),s=Object(xn.g)(i,o),u=Object(xn.h)(null,i,a,c),p=e.createLightboxFrame({type:l.c.INSTANT_DEBITS_APP,options:{intentId:c.id,clientSecret:c.clientSecret,apiKey:e._apiKey,returnOnConfirm:!1===s.handleActions}});return p.show(),p.fadeInBackdrop(),new T.a((function(n){var a=function(e){p.fadeOutBackdrop().then((function(){n(e)}))};p._once("cancel",(function(){p.fadeOutBackdrop(),e.action.localizeError(ya).then((function(e){a({error:e})}))})),p._on("instant-debits-fetch-payment-intent",(function(){e.action.retrievePaymentIntent({intentSecret:c,hosted:!1}).then((function(t){if(t.object){var r=t.object;p.send({action:"stripe-instant-debits-received-payment-intent",payload:{paymentIntent:r}}),!1===s.handleActions&&setTimeout((function(){p.fadeOutBackdrop(),a(Object(Jn.g)(t))}),2e3)}else{var o=t.error;e.action.localizeError(o).then((function(e){n({error:e})}))}}))})),p._on("instant-debits-attempt-payment",(function(n){e.action.confirmPaymentIntent(Object(r.a)(Object(r.a)({},u),{},{mode:{tag:"none",intentSecret:c},expectedType:null,options:s,mids:t})).then((function(t){t.object?(p.send({action:"stripe-instant-debits-successful-payment-intent",payload:{paymentIntent:t.object}}),setTimeout((function(){a(Object(Jn.g)(t))}),2e3)):e.action.localizeError(t.error).then((function(e){a({error:e})}))}))})),p._on("instant-debits-flow-error",(function(t){e.action.localizeError(ba).then((function(e){a({error:e})}))}))}))},Oa=function(e,t){if(null==e)return Object(u.D)(null);var n=e.type,r=Object(s.a)(e,["type"]),a=Object(u.G)(u.x,(function(){return null}))(n,Object(u.e)(t,"type"));return"error"===a.type?a:Object(u.D)({type:a.value,data:r})},ga=function(e,t,n,r){if(null===e){if(null===t){var a=r?"source_data":"payment_method_data";throw new v.a("".concat(n,": you must additionally specify the type of payment method to create within ").concat(a,"."))}return t}if(null===t)return e;if(t!==e)throw new v.a("".concat(n,": you specified `type: ").concat(t,"`, but ").concat(n," will create a ").concat(e," payment method."));return e},ja=function(e){return function(t,n){if("object"==typeof t&&null!==t){var a=t.source,o=t.source_data,i=t.payment_method,c=t.payment_method_data,l=Object(s.a)(t,["source","source_data","payment_method","payment_method_data"]);if(null!=a&&"string"!=typeof a)return Object(u.g)("string",typeof a,Object(u.e)(n,"source"));if(null!=i&&"string"!=typeof i)return Object(u.g)("string",typeof i,Object(u.e)(n,"payment_method"));if(null!=o&&"object"!=typeof o)return Object(u.g)("object",typeof o,Object(u.e)(n,"source_data"));if(null!=c&&"object"!=typeof c)return Object(u.g)("object",typeof c,Object(u.e)(n,"payment_method_data"));var p=Oa(o,Object(u.e)(n,"source_data"));if("error"===p.type)return p;var d=p.value,f=Oa(c,Object(u.e)(n,"payment_method_data"));if("error"===f.type)return f;var m=f.value;return Object(u.D)({sourceData:d,source:null==a?null:a,paymentMethodData:m,paymentMethod:null==i?null:i,otherParams:Object(r.a)(Object(r.a)({},e),l)})}return null===t?Object(u.g)("object","null",n):Object(u.g)("object",typeof t,n)}},Ea=function(e){return function(t,n){if(void 0===t)return Object(u.D)({sourceData:null,paymentMethodData:null,source:null,paymentMethod:null,otherParams:{}});if("object"!=typeof t)return Object(u.g)("object",typeof t,n);if(null===t)return Object(u.g)("object","null",n);if(e){if(!t.payment_intent){var a=Object(u.E)(Object(u.u)({return_url:Object(u.s)(u.x),expand:Object(u.s)(Object(u.a)(u.x)),shipping:Object(u.s)(Object(u.d)({name:u.x,address:Object(u.d)({line1:Object(u.s)(u.x),line2:Object(u.s)(u.x),city:Object(u.s)(u.x),state:Object(u.s)(u.x),postal_code:Object(u.s)(u.x),country:Object(u.s)(u.x)})}))}),t,"validate otherParams").value,o=Object(r.a)(Object(r.a)({},t),a);return Object(u.D)({sourceData:null,paymentMethodData:null,source:null,paymentMethod:null,otherParams:o})}var i=t.payment_intent,c=Object(s.a)(t,["payment_intent"]);return ja(c)(i,Object(u.e)(n,"payment_intent"))}return t.payment_intent?Object(u.f)(new v.a("The payment_intent parameter has been removed. To fix, move everything nested under the payment_intent parameter to the top-level object.")):ja({})(t,n)}},wa=function(e,t,n,a,o){return function(i,c){var s=function(e,t,n,a,o,i,c){var s=Object(u.F)(br.c,o,a);if("error"===s.type)return null;var l=s.value,p=Object(u.E)(Ea(t),i,a).value,d=p.sourceData,f=p.source,m=p.paymentMethodData,_=p.paymentMethod,h=p.otherParams;if(!e&&d)throw new v.a("".concat(a,": Expected payment_method_data, not source_data."));if(null!=f)throw new v.a("When calling ".concat(a," on an Element, you can't pass in a pre-existing source ID, as a source will be created using the Element."));if(null!=_)throw new v.a("When calling ".concat(a," on an Element, you can't pass in a pre-existing PaymentMethod ID, as a PaymentMethod will be created using the Element."));var b=l._componentName,y=l._implementation._frame.id,O=d||m||{type:null,data:{}},g=O.type,j=O.data,E=Object(sr.d)(b,g),w=e&&!m,S={elementName:b,frameId:y,type:ga(n,E,a,w),data:j};return w?{mode:Object(r.a)({tag:"source-from-element",intentSecret:c},S),otherParams:h}:{mode:Object(r.a)({tag:"paymentMethod-from-element",options:null,intentSecret:c},S),otherParams:h}}(e,t,n,a,i,c,o);if(s)return s;var l=function(e,t,n,r,a,o,i){var c=Object(u.E)(Ea(t),a,r).value,s=c.sourceData,l=c.source,p=c.paymentMethodData,d=c.paymentMethod,f=c.otherParams;if(!e&&s)throw new v.a("".concat(r,": Expected payment_method, source, or payment_method_data, not source_data."));if(null!==l&&null!==s)throw new v.a("".concat(r,": Expected either source or source_data, but not both."));if(null!==d&&null!==p)throw new v.a("".concat(r,": Expected either payment_method or payment_method_data, but not both."));if(null!==d&&null!==l)throw new v.a("".concat(r,": Expected either payment_method or source, but not both."));if(s||p){var m=s||p||{},_=m.type,h=m.data,b=e&&!p,y=ga(n,_,r,b);return b?{mode:{tag:"source-from-data",intentSecret:i,type:y,data:h},otherParams:f}:{mode:{tag:"paymentMethod-from-data",type:y,data:h,intentSecret:i,options:null},otherParams:f}}return null!==l?{mode:{tag:"source",intentSecret:i,source:l},otherParams:f}:null!==d?{mode:{tag:"paymentMethod",paymentMethod:d,intentSecret:i,options:null},otherParams:f}:{mode:{tag:"none",intentSecret:i},otherParams:f}}(e,t,n,a,i,0,o);if(l)return l;throw new v.a("Expected: stripe.".concat(a,"(intentSecret, element[, data]) or stripe.").concat(a,"(intentSecret[, data]). Please see the docs for more usage examples https://stripe.com/docs/payments/dynamic-authentication"))}},Sa=function(e,t,n,a,o,i){var c=Object(u.E)(On.h,a,"stripe.confirmPaymentIntent intent secret").value,s=wa(e,!1,null,"confirmPaymentIntent",c)(o,i);return t.action.confirmPaymentIntent(Object(r.a)(Object(r.a)({},s),{},{expectedType:null,options:{handleActions:!1},mids:n})).then(Jn.g)},ka=function(e,t,n,a,o,i,c){var s=Object(u.E)(On.h,o,"stripe.handleCardPayment intent secret").value,l=sr.b.card,p=wa(e,a,l,"handleCardPayment",s)(i,c),d=!i&&!c;return t.action.confirmPaymentIntent(Object(r.a)(Object(r.a)({},p),{},{expectedType:l,options:{handleActions:!0},mids:n})).then(Object(Or.b)(t,l,d,!1))},Aa=function(e,t,n,a,o,i){var c=Object(u.E)(On.h,a,"stripe.handleSepaDebitPayment intent secret").value,s=sr.b.sepa_debit,l=wa(!1,n,s,"handleSepaDebitPayment",c)(o,i),p=!o&&!i;return e.action.confirmPaymentIntent(Object(r.a)(Object(r.a)({},l),{},{expectedType:s,options:{handleActions:!0},mids:t})).then(Object(Or.b)(e,s,p,!1))},Pa=function(e,t,n,a,o,i,c){var s=Object(u.E)(On.h,o,"stripe.handleIdealPayment intent secret").value,l=sr.b.ideal,p=wa(e,a,l,"handleIdealPayment",s)(i,c),d=!i&&!c;return t.action.confirmPaymentIntent(Object(r.a)(Object(r.a)({},p),{},{expectedType:l,options:{handleActions:!0},mids:n})).then(Object(Or.b)(t,l,d,!1))},Ta=function(e,t,n,a,o,i){var c=Object(u.E)(On.h,a,"stripe.handleFpxPayment intent secret").value,s=sr.b.fpx,l=wa(!1,n,s,"handleFpxPayment",c)(o,i),p=!o&&!i;return e.action.confirmPaymentIntent(Object(r.a)(Object(r.a)({},l),{},{expectedType:s,options:{handleActions:!0},mids:t})).then(Object(Or.b)(e,s,p,!1))},Ia=function(e){switch(e.type){case"object":return{returnIntent:e.object};case"error":return{error:e.error};default:return Object(Re.a)(e)}},Ca=function(e,t,n){return e.action.confirmReturnIntent({returnIntentId:t,data:n}).then(Ia)},Na=n(66),Ra=n(67),xa=n(71),Ma=n(68),La=n(69),Da=n(72),qa=function(e,t,n,r,a,o){var i=Object(Na.a)(Object(Jn.c)(t),n,e),c=Object(Jn.e)(t);if(!i)return T.a.resolve({setupIntent:t});switch(i.type){case"captcha-challenge":return Object(Ma.a)(i,t,e,r);case"3ds1-modal":return Object(Ra.a)(i,c,l.g.SETUP_INTENT,e,r,o);case"3ds2-fingerprint":case"3ds2-challenge":return Object(xa.a)(i,{intentSecret:c,intentType:l.g.SETUP_INTENT,controller:e,locale:r,hosted:a},o);case"redirect":return Object(La.b)(t,i.redirectUrl,e);case"us_bank_account_link":return Object(Da.a)({controller:e,intentSecret:c,intentType:l.g.SETUP_INTENT,locale:r});case"link_authenticate_account":return e.action.completeLinkSetup({intentSecret:t.client_secret,intentId:t.id,expandParam:o}).then((function(e){return e?T.a.resolve(Object(Jn.h)(e)):T.a.resolve({setupIntent:t})}));default:return T.a.resolve({setupIntent:t})}},Ba=function e(t,n,r,a,o,i){var c=arguments.length>6&&void 0!==arguments[6]?arguments[6]:0;if(l.i-1?t.push(je.a[e]):n.push(e)})),n.length>0){var r="The following betas are unrecognized for Stripe() parameter:\n\n- ".concat(n.join("\n- "),"\n\n They are either invalid or expired betas, please remove these beta flags to prevent future integration issues.");return{validBetas:t,betaWarning:r}}return{validBetas:t}}(s.betas||null),j=g.validBetas,E=g.betaWarning;E&&l.push(E),cr(d),(null==b?void 0:b.mids)&&(e._ec=ce({checkoutIds:b.mids})),this._apiKey=d.trim(),this._keyMode=Object(p.c)(this._apiKey),this._betas=j,this._locale=Te(_,this._betas)||null,this._stripeAccount=f||null,this._isCheckout=!!b,this._attachControllerGetter(m,h,f,i),l.forEach((function(e){return a._controller.warn(e)})),de(),this._ensureHTTPOnlyLinkCookie(),this._ensureHTTPS(),this._ensureStripeHosted(n),this._attachPaymentIntentMethods(this._betas,!!y),this._attachLegacyPaymentIntentMethods(this._betas),this._attachCheckoutMethods(this._betas),this._attachPrivateMethodsForCheckout(this._isCheckout),this._attachPrivateMethodsForConsumer(Z),this._attachCreateRadarSession(O||!1),this._attachGetters(),this._attachIssuingCardMethods(this._betas),this._attachIdentityMethods(this._betas),this._attachLinkedAccounts(this._betas),this._attachAppInfo()}return Object(i.a)(e,[{key:"_attachCreateRadarSession",value:function(e){var t=this;e&&(this.createRadarSession=Object(x.b)((function(){return t._midsPromise().then((function(e){return n=t._controller,r=e,n.action.createRadarSession({mids:r}).then(go);var n,r}))})))}},{key:"_attachPaymentIntentMethods",value:function(e,t){var r=this,a=function(){return r._mids()};this.createPaymentMethod=Object(x.g)((function(){for(var e=arguments.length,t=new Array(e),n=0;n